tedana.metrics.external.fit_regressors
- fit_regressors(component_table: DataFrame, external_regressors: DataFrame, external_regressor_config: List[Dict], mixing: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) DataFrame[source]
Fit regressors to the mixing matrix.
Uses correlation or F statistics in a linear model depending on the calc_stats value in external_regressor_config
- Parameters:
component_table ((C x X)
pandas.DataFrame) – Component metric table. One row for each component, with a column for each metric. The index is the component number.external_regressors ((T x R)
pandas.DataFrame) – Each column is a labelled regressor and the number of rows should match the number of timepoints in the fMRI time seriesexternal_regressor_config (
list[dict]) – Information describing the external regressors and method to use for fitting and statistical testsmixing ((T x C) array_like) – Mixing matrix for converting input data to component space, where C is components and T is the same as in data_cat
- Returns:
component_table ((C x X)
pandas.DataFrame) – Component metric table. Same as inputted, with added columns for metrics related to the external regressor fits