Esempio n. 1
0
csp_lda = make_pipeline(CSP(n_components=2), LDA())
ts_lr = make_pipeline(Covariances(estimator='oas'),
                      TangentSpace(metric='riemann'), LR(C=1.0))
results = evaluation.process({'csp+lda': csp_lda, 'ts+lr': ts_lr})
print(results.head())

##############################################################################
# Electrode selection
# -------------------
#
# It is possible to select the electrodes that are shared by all datasets
# using the `find_intersecting_channels` function. Datasets that have 0
# overlap with others are discarded. It returns the set of common channels,
# as well as the list of datasets with valid channels.

electrodes, datasets = find_intersecting_channels(datasets)
evaluation = WithinSessionEvaluation(paradigm=paradigm,
                                     datasets=datasets,
                                     overwrite=True)
results = evaluation.process({'csp+lda': csp_lda, 'ts+lr': ts_lr})
print(results.head())

##############################################################################
# Plot results
# ------------
#
# Compare the obtained results with the two pipelines, CSP+LDA and logistic
# regression computed in the tangent space of the covariance matrices.

fig = moabb_plt.paired_plot(results, 'csp+lda', 'ts+lr')
plt.show()
Esempio n. 2
0
 def test_channel_intersection_fun(self):
     print(utils.find_intersecting_channels([d() for d in utils.dataset_list])[0])