mne_denoise.bss_cca.compute_bss_cca#

mne_denoise.bss_cca.compute_bss_cca(X: ndarray, *, lag_samples: int | None = None, lag_seconds: float | None = None, sfreq: float | None = None, n_remove: int | None = None, rho_threshold: float | None = None, reject: str = 'low', threshold_on: str = 'rho', segment_len: float | None = None, overlap: float = 0.0, preserve_mean: bool = True, callback=None, verbose: bool | str | int | None = None) tuple[ndarray, dict[str, Any]][source]#

Learn and apply reference-free BSS-CCA to channel-first data.

Parameters:
Xndarray, shape (n_channels, n_times) or (n_epochs, n_channels, n_times)

Continuous or epoched channel-first data.

lag_samplesint or None, default=None

Positive lag in samples. Defaults to one sample unless lag_seconds is set.

lag_secondsfloat or None, default=None

Positive lag in seconds; requires sfreq and is mutually exclusive with lag_samples.

sfreqfloat or None, default=None

Sampling frequency, required for lag_seconds and segment_len.

n_removeint or None, default=None

Number of components removed from the end selected by reject.

rho_thresholdfloat or None, default=None

Correlation threshold used instead of n_remove. Exactly one selection rule must be supplied.

reject{“low”, “high”}, default=”low”

End of the correlation spectrum treated as artifactual.

threshold_on{“rho”, “rsq”}, default=”rho”

Scale for rho_threshold.

segment_lenfloat or None, default=None

Continuous-data block length in seconds. None uses one operator.

overlapfloat, default=0.0

Fraction shared by neighboring continuous-data blocks.

preserve_meanbool, default=True

Add the fitted channel mean after cleaning.

callbackcallable or None, default=None

Synchronous block-progress callback in segmented mode.

verbosebool, str, int, or None, default=None

Logging level.

Returns:
X_cleanndarray

Cleaned data with the same shape as X.

infodict

Operators, resolved settings, and component diagnostics.

See also

BSSCCA

Estimator that learns operators in fit and reuses them in transform.

Notes

CCA is computed between the signal and a lagged copy. With reject=”low”, components with the lowest lagged correlation are removed; reject=”high” removes the highest. Segmented mode is continuous-only and cannot span epoch boundaries [1][2][3].

References