MCPcopy Index your code
hub / github.com/mne-tools/mne-python / apply

Method apply

mne/decoding/ssd.py:359–385  ·  view source on GitHub ↗

Remove selected components from the signal. This procedure will reconstruct M/EEG signals from which the dynamics described by the excluded components is subtracted (denoised by low-rank factorization). See :footcite:`HaufeEtAl2014b` for more information. ..

(self, X)

Source from the content-addressed store, hash-verified

357 raise NotImplementedError("inverse_transform is not yet available.")
358
359 def apply(self, X):
360 """Remove selected components from the signal.
361
362 This procedure will reconstruct M/EEG signals from which the dynamics
363 described by the excluded components is subtracted
364 (denoised by low-rank factorization).
365 See :footcite:`HaufeEtAl2014b` for more information.
366
367 .. note:: Unlike in other classes with an apply method,
368 only NumPy arrays are supported (not instances of MNE objects).
369
370 Parameters
371 ----------
372 X : array, shape ([n_epochs, ]n_channels, n_times)
373 The input data from which to estimate the SSD. Either 2D array
374 obtained from continuous data or 3D array obtained from epoched
375 data.
376
377 Returns
378 -------
379 X : array, shape ([n_epochs, ]n_channels, n_times)
380 The processed data.
381 """
382 X_ssd = self.transform(X)
383 pick_patterns = self.patterns_[: self.n_components].T
384 X = pick_patterns @ X_ssd
385 return X
386
387
388@verbose

Callers 15

test_ssdFunction · 0.95
xhemi.pyFile · 0.45
muscle_ica.pyFile · 0.45
eog_regression.pyFile · 0.45
xdawn_denoising.pyFile · 0.45
morphMethod · 0.45
_write_annotations_csvFunction · 0.45

Calls 1

transformMethod · 0.95

Tested by 15

test_ssdFunction · 0.76
test_eyelinkFunction · 0.36
test_sparse_morphFunction · 0.36
test_xhemi_morphFunction · 0.36
test_morph_stc_denseFunction · 0.36
test_morph_stc_sparseFunction · 0.36