Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: deal with flat epochs in feature extraction #7

Open
jbschiratti opened this issue Mar 22, 2018 · 1 comment
Open

FIX: deal with flat epochs in feature extraction #7

jbschiratti opened this issue Mar 22, 2018 · 1 comment

Comments

@jbschiratti
Copy link
Collaborator

jbschiratti commented Mar 22, 2018

The function extract_features extracts features from a data array X, shape (n_epochs, n_channels, n_times) epoch by epoch. If an epoch is flat (that is, if np.allclose(X[j, :, :], 0) is True), then most feature functions will either return arrays of 0 or fails (log of negative values, division by 0,...).

Possible fix:
The utility function _apply_extractor should check if the epoch is flat and, if so, deal with it (for example: return 0 for all the features + warning to the user).

@agramfort
Copy link
Member

agramfort commented Mar 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants