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 Issue with EEGClassifier Handling Small Training Sets and Unexpected Class Generation for Binary Classification #570

Open
Buddies-as-you-know opened this issue Feb 14, 2024 · 1 comment
Labels
bug Something isn't working code-improvement

Comments

@Buddies-as-you-know
Copy link

When using the EEGClassifier class from the braindecode library for training on small datasets, two significant issues arise:

  1. Loss Calculation Failure: The classifier fails to compute the loss when the training dataset is too small. This problem occurs due to the inability of the loss function to process insufficient data samples, which is a common challenge in machine learning models but should be gracefully handled or documented for users of EEGClassifier.

  2. Unexpected Class Generation in Binary Classification: Despite being configured for binary classification tasks, the classifier sometimes generates predictions for classes outside the binary scope. This behavior is unexpected and can lead to erroneous interpretation of the model's predictions. It suggests a possible issue in how the class labels are being inferred or managed within the classifier, especially under conditions where the model is expected to distinguish between two classes only.

Expected Behavior

  • The EEGClassifier should provide a clear error message or documentation indicating the minimum dataset size required for effective training and loss calculation. If possible, implementing a fallback mechanism or a warning that suggests best practices for training on small datasets could enhance usability.
  • For binary classification tasks, the classifier should strictly limit its predictions to the two expected classes. Any deviation from this should be addressed by ensuring that the class inference mechanism correctly interprets the training data and the specified classes parameter, if provided.
@bruAristimunha
Copy link
Collaborator

Hey @Buddies-as-you-know!

Thanks for pointing out those issues! 🙏 Could you share a bit of code to help us see what's happening? It'd really help us get to the bottom of this faster.

Also, would you like to try fixing them by creating a PR (Pull Request)? It’s a great way to dive into our open-source project and make a difference. Plus, we all get to learn and improve together. What do you think?

@bruAristimunha bruAristimunha added bug Something isn't working code-improvement labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code-improvement
Projects
None yet
Development

No branches or pull requests

2 participants