tedana.metrics.external.calculate_max_rp_corr
- calculate_max_rp_corr(*, mixing: ndarray, regressors: ndarray, seed: int | None = 0) ndarray[source]
Calculate the maximum regressor-correlation (max_rp_corr) for each component.
Computes the mean, over 1000 random 90%-subsamples of timepoints, of the maximum absolute Pearson correlation between each component time series and a 6*N-regressor model built from N input regressors (raw N parameters, their derivatives, and both sets time-shifted ±1 TR). Correlations are computed for the raw time series and their element-wise squares, giving 12*N total comparisons per split.
- Parameters:
mixing ((T x C) array_like) – ICA mixing matrix where T is time points and C is components.
regressors ((T x N) array_like) – Regressor time series with T timepoints and N columns.
seed (int or None, optional) – Seed for the random subsampling. The default is 0 for reproducible results. Set to None or -1 for stochastic sampling.
- Returns:
max_rp_corr ((C,) numpy.ndarray) – Maximum regressor-correlation score for each component. Values are in [0, 1].
Notes
This metric is taken from ICA-AROMA [1], but the corresponding classification step cannot be reproduced within tedana, as ICA-AROMA combines this metric with its “edge fraction” metric, which has not been implemented in tedana. As such, any decision-tree thresholds based on this metric must be considered experimental.
The expanded regressor model has
6 * Ncolumns before squared comparisons.- Raises:
ValueError – If
regressorsis not 2-D or its row count does not matchmixing.
References