mne_denoise.dss.AverageBias#

class mne_denoise.dss.AverageBias(axis: str = 'epochs', weights: ndarray | None = None)[source]#

Averaging bias for repeatable DSS structure.

Parameters:
axis{“epochs”, “datasets”}, default=”epochs”

For "epochs", input has shape (n_channels, n_times, n_epochs). For "datasets", input has shape (n_datasets, n_channels, n_times).

weightsarray-like or None, default=None

Epoch weights, optionally a (n_times, n_epochs) observation-weight matrix, or one weight per dataset depending on axis.

Notes

axis="datasets" is a low-level dataset-first bias operation; it is not a second NumPy input layout for the channel-first DSS estimator.

apply(data: ndarray) ndarray[source]#

Apply the averaging bias.

Parameters:
datandarray, shape (n_channels, n_times, n_epochs) or (n_datasets, n_channels, n_times)

Shape is determined by axis.

Returns:
ndarray

Weighted-average data with the input shape.