mne_denoise.ssa.compute_local_ssa#
- mne_denoise.ssa.compute_local_ssa(X: ndarray, window_length: int | None = None, *, window_seconds: float | None = None, sfreq: float | None = None, n_clusters: int | str = 'auto', max_clusters: int = 10, max_window: int = 100, random_state: int | None = 0, callback=None, verbose: bool | str | int | None = None) tuple[ndarray, dict[str, Any]][source]#
Apply local SSA independently to each channel.
- Parameters:
- Xarray-like, shape (n_channels, n_times)
Finite channel-first data. Channels are not mixed.
- window_lengthint | None, default=None
Delay-vector dimension in samples; None selects it automatically.
- window_secondsfloat | None, default=None
Delay-vector duration in seconds, requiring sfreq and mutually exclusive with window_length.
- sfreqfloat | None, default=None
Sampling frequency in Hz.
- n_clustersint or “auto”, default=”auto”
Number of delay-vector clusters, or automatic reliable selection.
- max_clustersint, default=10
Upper bound for automatic cluster selection.
- max_windowint, default=100
Maximum automatic delay-vector dimension.
- random_stateint | None, default=0
Seed passed to k-means.
- callbackcallable | None, default=None
Synchronous callback after each channel; return values are ignored and callback exceptions propagate.
- verbosebool, str, int, or None
Logging level.
- Returns:
- X_cleanndarray, shape (n_channels, n_times)
Independently cleaned channels.
- infodict
Per-channel cluster, subspace, and reconstruction diagnostics.
Notes
This is repeated univariate local SSA, not multivariate SSA.