Created
July 11, 2020 14:44
-
-
Save sylvchev/8e1ace114ae6d6baeb9d562f38c85bb5 to your computer and use it in GitHub Desktop.
Channel selection in MOABB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moabb | |
from moabb.datasets import BNCI2014001, Zhou2016 | |
from moabb.paradigms import LeftRightImagery | |
from moabb.evaluations import WithinSessionEvaluation | |
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA | |
from sklearn.pipeline import make_pipeline | |
from mne.decoding import CSP | |
datasets = [Zhou2016(), BNCI2014001()] | |
paradigm = LeftRightImagery(channels=['C3', 'C4', 'Cz'], resample=200.) | |
evaluation = WithinSessionEvaluation(paradigm=paradigm, datasets=datasets, overwrite=False) | |
pipeline = make_pipeline(CSP(n_components=8), LDA()) | |
results = evaluation.process({'csp+lda':pipeline}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment