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

Method _subset_multi_components

mne/decoding/base.py:272–284  ·  view source on GitHub ↗
(self, name="filters")

Source from the content-addressed store, hash-verified

270 return X
271
272 def _subset_multi_components(self, name="filters"):
273 # The shape of stored filters and patterns is
274 # is (n_classes, n_evecs, n_chs)
275 # Transform and subset into (n_classes*n_components, n_chs)
276 if name == "filters":
277 return self.filters_[:, : self.n_components, :].reshape(
278 -1, self.filters_.shape[2]
279 )
280 elif name == "patterns":
281 return self.patterns_[:, : self.n_components, :].reshape(
282 -1, self.patterns_.shape[2]
283 )
284 return None
285
286 def _validate_required_args(self, func, desired_required_args):
287 sig = signature(func)

Callers 5

transformMethod · 0.95
test_XdawnTransformerFunction · 0.80
inverse_transformMethod · 0.80
test_ged_binary_covFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_XdawnTransformerFunction · 0.64
test_ged_binary_covFunction · 0.64