fitgrid.tools module¶
- fitgrid.tools.design_matrix_is_constant(df, columns, time)[source]¶
Check that values in columns of df do not change within any epoch.
See Notes for more details.
- Parameters
df (pandas.DataFrame) – dataframe to check
columns (list of str) – list of column names to be checked
time (str) – name of the time column
- Returns
result – True if values in specified columns don’t change, False otherwise
- Return type
bool
Notes
We check that from timepoint to timepoint, each epoch has the same value in a given column:
¶ A
B
1
x
1
x
1
x
1
x
1
x
¶ A
B
2
y
2
y
2
y
2
y
2
y
This is helpful when performing linear regression on an epochs table where the predictors vary with epochs (as they are expected to) but stay constant from sample to sample, because we can do our modeling much faster.
- fitgrid.tools.get_blas(numpy_module)[source]¶
Return BLAS object or None if neither MKL nor OpenBLAS is found.