mne_denoise.dss.TanhMaskDenoiser#
- class mne_denoise.dss.TanhMaskDenoiser(alpha: float = 1.0, *, normalize: bool = True)[source]#
Scaled hyperbolic-tangent nonlinearity.
The transform is
tanh(alpha * source). Whennormalize=True, the source is divided by its standard deviation before the transform and the result is rescaled by the same value.- Parameters:
- alphafloat, default=1.0
Tanh scale.
- normalizebool, default=True
Whether to standardize and rescale the source around the transform.
- denoise(source: ndarray) ndarray[source]#
Apply the scaled hyperbolic-tangent nonlinearity.
- Parameters:
- sourcendarray, shape (n_times,) or (n_times, n_epochs)
Source time series. Normalization, when enabled, is computed over the supplied values.
- Returns:
- denoisedndarray, same shape as
source tanh(alpha * source)with optional standard-deviation scaling.
- denoisedndarray, same shape as