Common Spatial Pattern (CSP)

Hello everyone! Do you have any suggestions on how to solve the following error: “The leading minor of order 13 of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed”?

try to pass something to the reg parameter. For example reg=0.1

see https://mne.tools/stable/generated/mne.decoding.CSP.html

Alex

1 Like

I included reg=0.1 in the first part and it’s now working, but I get again the same error when I run:
X_train = csp.fit_transform(epochs_data_train[train_idx], y_train)
(from the same tutorial “Look at performance over time”: Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP) — MNE 0.23.0 documentation)
Any suggestions?

you have here csp.reg == 0.1 ?

Alex

Yes, I just checked and reg is equal to 0.1!

can you share a folder with a script and data so I can replicate the pb?

Alex