Reported on the forum:
https://mne.discourse.group/t/can-not-do-csp-fit-transform-without-label/4072
Calling CSP.fit_transform() without y (which is alright according to the API, which defaults y=None) yields the following exception:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Users/long/anaconda/envs/3.6/lib/python3.6/site-packages/mne/decoding/mixin.py", line 30, in fit_transform
return self.fit(X, **fit_params).transform(X)
TypeError: fit() missing 1 required positional argument: 'y'
This is because the fit_transform() method inherited from TransformerMixin is not compatible with the fit method implemented in CSP.
Solution is to give CSP its very own fit_transform method that doesn't make y an optional parameter.
Reported on the forum:
https://mne.discourse.group/t/can-not-do-csp-fit-transform-without-label/4072
Calling
CSP.fit_transform()withouty(which is alright according to the API, which defaultsy=None) yields the following exception:This is because the
fit_transform()method inherited fromTransformerMixinis not compatible with thefitmethod implemented inCSP.Solution is to give
CSPits very ownfit_transformmethod that doesn't makeyan optional parameter.