MCPcopy
hub / github.com/mne-tools/mne-python / transform

Method transform

mne/decoding/ems.py:88–103  ·  view source on GitHub ↗

Transform the data by the spatial filters. Parameters ---------- X : array, shape (n_epochs, n_channels, n_times) The input data. Returns ------- X : array, shape (n_epochs, n_times) The input data transformed by the spatial f

(self, X)

Source from the content-addressed store, hash-verified

86 return self
87
88 def transform(self, X):
89 """Transform the data by the spatial filters.
90
91 Parameters
92 ----------
93 X : array, shape (n_epochs, n_channels, n_times)
94 The input data.
95
96 Returns
97 -------
98 X : array, shape (n_epochs, n_times)
99 The input data transformed by the spatial filters.
100 """
101 X = self._check_data(X)
102 Xt = np.sum(X * self.filters_, axis=1)
103 return Xt
104
105
106@verbose

Callers 1

test_emsFunction · 0.95

Calls 2

_check_dataMethod · 0.45
sumMethod · 0.45

Tested by 1

test_emsFunction · 0.76