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

Method fit_transform

mne/decoding/transformer.py:238–262  ·  view source on GitHub ↗

Fit to data, then transform it. Fits transformer to epochs_data and y and returns a transformed version of epochs_data. Parameters ---------- epochs_data : array, shape (n_epochs, n_channels, n_times) The data. y : None | array, shape (n_

(self, epochs_data, y=None)

Source from the content-addressed store, hash-verified

236 return _sklearn_reshape_apply(self.scaler_.transform, True, epochs_data)
237
238 def fit_transform(self, epochs_data, y=None):
239 """Fit to data, then transform it.
240
241 Fits transformer to epochs_data and y and returns a transformed version
242 of epochs_data.
243
244 Parameters
245 ----------
246 epochs_data : array, shape (n_epochs, n_channels, n_times)
247 The data.
248 y : None | array, shape (n_epochs,)
249 The label for each epoch.
250 Defaults to None.
251
252 Returns
253 -------
254 X : array, shape (n_epochs, n_channels, n_times)
255 The data concatenated over channels.
256
257 Notes
258 -----
259 This function makes a copy of the data before the operations and the
260 memory usage may be large with big data.
261 """
262 return self.fit(epochs_data, y).transform(epochs_data)
263
264 def inverse_transform(self, epochs_data):
265 """Invert standardization of data across channels.

Callers 2

test_scalerFunction · 0.95
test_regularized_cspFunction · 0.95

Calls 2

fitMethod · 0.95
transformMethod · 0.45

Tested by 2

test_scalerFunction · 0.76
test_regularized_cspFunction · 0.76