Comments (6)
I just took a short look at current examples to see what can be improved in the EEGClassifier interface. I think that the most unfriendly part is the callbacks part which takes a lot of lines and does really similar thing for CroppedDecoding
and TrialDecoding
but differs in details. My idea is to create two list of standard callbacks in the callbacks.py
file so we can just import cropped_callbacks
or trial_callbacks
, sth like here sliwy@bbdf77e. This way we will remove callback definition from examples. Do you think that we should hide more from the user? @robintibor I think that other things should be easily accessible by a user (like batch_size
, optimizer
, lr
, train_test_split
).
from braindecode.
I feel this may be a little too opaque for the user, how about we allow to supply a list of scikit-learn scoring functions like ['accuracy', 'f1_score'] either as cropped_scorings
or as trial_scorings
and rest of code is created internally? Then you can still decide which scorings you want but they are automatically correctly created and by default applied to both train and valid... ? How you think @sliwy
from braindecode.
Seems legit to me and won't need a lot of modification. I'll try to implement.
from braindecode.
@robintibor Do you know any way to infer if the callbacks should be Cropped
or Trial
in the EEGClassifier
? I started and my first option was as below:
callbacks = ['accuracy', 'f1', 'roc_auc']
EEGClassifier(...., callbacks=callbacks)
Few questions/problems I see we should discuss before implementing:
- This form does not contain information about
lower_is_better
which is quite important. The only possible way to figure out is to use hacks from sklearn:
get_scorer('accuracy')._score_func.__name__
should give us name (accuracy_score
) of scoring function and based on it according to sklearn docs:
functions ending with _score return a value to maximize, the higher the better.
functions ending with _error or _loss return a value to minimize, the lower the better. When converting into a scorer object using make_scorer, set the greater_is_better parameter to False (True by default; see the parameter description below).
- We will give the user a possibility to mix our way of defining callbacks with strings, only for scorings and skorch callbacks for anything else. Easy if in the callback parser should be sufficient for this.
- String way of defining callbacks does not give a possibility to specify whether
BatchScoring
orEpochScoring
should be used. I will start withEpochScoring
as it should be a more general way (except we have too little memory). - Still a problem with
CroppedScoring
andTrialScoring
, I don't see an easy way to infer the needed callback type.
from braindecode.
@robintibor Take a look at it: sliwy@82f2126 it does not support CroppedDecoding
for now. First version for TrialDecoding
, should be better tested, now just to show the conception.
from braindecode.
Ya this seems really nice sliwy@82f2126. regarding knowing cropped or not, I think this can be a constructor_parameter cropped=True/False
. I think it's not bad if this is written explicitly by user
from braindecode.
Related Issues (20)
- Making Unit Tests Faster by Using Simulated Data
- What is the best way to generate multiple views of a sample (window) in Braindecode? HOT 1
- Confusution between description and the code in the BandStop augmentation
- [docs] Model overview HOT 1
- Discrepancy in EEGNet Implementation: Extra Conv2D Layer HOT 1
- release 0.8 HOT 4
- Subject: ModuleNotFoundError: No module named 'braindecode.training' after installing Braindecode 0.8 HOT 7
- [Question] what difference between `braindecode.EEGClassifier` and `skorch.NeuralNetClassifier` HOT 3
- Annotations are now always set in MOABB HOT 1
- Problem with Input format HOT 1
- Implement GCNs-Net Model for EEG Motor Imagery Signal Decoding in EEGdecoder Repository
- Implement GCNs-Net Model for EEG Motor Imagery Signal Decoding in EEGdecoder Repository HOT 1
- predict_trials() returns ground truth labels from Dataset as trial_labels? HOT 2
- compute_amplitude_gradients
- when running in VScode Juptyer, kernel crashes HOT 1
- Fix Issue with EEGClassifier Handling Small Training Sets and Unexpected Class Generation for Binary Classification HOT 1
- Avoid old parameters in the signature and use from now on "*," in function
- TCN and HybridNet are not working with 3 dims input
- Improve the whole function documentation
- This is not a issue but I have an important question HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braindecode.