Closed akatav closed 5 years ago
Unless I am mistaken, this issue does not seem related to mne-features
. If you are using the mne.decoding.CSP
estimator, you'd better post this on the mne-python
issue tracker. In your case, the problem might be that you do not have enough time points per epochs (as you crop all your epochs using the length of the smallest one).
Dataset consists of some 20 files, 10 control and 10 typical/healthy individuals. Each file is read and the raw data is epoched (With overlap) and squashed into one huge array of dimension (n_epochs, n_channels, n_times). For instance, if a certain file is read in using read_raweeg(), it is subsequently epoched using make_fixed_length_events() into a matrix of dimension - (n_epochs, n_channels, n_times). Each file is epoched in this manner and n_epochs and n_times vary for each file. We select the min(n_times) (of all files) and truncate the epochs. What we have left is a list of epochs for each file where n_times is the same across all epochs. We prepare a corresponding 'y' binary variable whose length is (sum(n_epochs),). We aim to call csp.fit_transform(all_epochs, y) to classify between control and healthy subjects and to plot the respective patterns.
On doing so, we get the following error: LinAlgError: the leading minor of order 4 of 'b' is not positive definite. The factorization of 'b' could not be completed and no eigenvalues or eigenvectors were computed.
How should this be handled?