This week, I upgraded my MNE env from V 1.5.1 to 1.7.1 and machine learning model report error. After check, I found the parameter ‘rank’ in decoding.CSP() no longer supports string value.
e.g.
csp = CSP(n_components=csp_componnets, reg=‘empirical’, log=True, cov_est=‘concat’, transform_into=‘average_power’, norm_trace=False, rank=‘full’, component_order=‘mutual_info’)
csp.fit(X, y)
will cause
Traceback (most recent call last):
Cell In[87], line 1
csp.fit(X, y)File E:\conda_env\mne\Lib\site-packages\mne\decoding\csp.py:196 in fit
_validate_type(self.rank, (dict, None), “rank”)File E:\conda_env\mne\Lib\site-packages\mne\utils\check.py:613 in _validate_type
raise TypeError(TypeError: rank must be an instance of dict or None, got <class ‘str’> instead.
Meanwhile, the API reference of CSP keeps same as before. mne.decoding.CSP — MNE 1.7.1 documentation
Please update the API reference, so we can learn what’s new, thanks.
- MNE version: 1.7.1
- operating system: win 10