moabb.pipelines.classification.SSVEP_CCA#
- class moabb.pipelines.classification.SSVEP_CCA(interval, freqs, n_harmonics=3)[source]#
Classifier based on Canonical Correlation Analysis for SSVEP.
A CCA is computed from the set of training signals and some pure sinusoids to act as reference. Classification is made by taking the frequency with the max correlation, as proposed in [1].
- Parameters
interval (list of length 2) – List of form [tmin, tmax]. With tmin and tmax as defined in the SSVEP paradigm
moabb.paradigms.SSVEP()
freqs (dict with n_classes keys) – Frequencies corresponding to the SSVEP stimulation frequencies. They are used to identify SSVEP classes presents in the data.
n_harmonics (int) – Number of stimulation frequency’s harmonics to be used in the generation of the CCA reference signal.
References
- 1
Bin, G., Gao, X., Yan, Z., Hong, B., & Gao, S. (2009). An online multi-channel SSVEP-based brain-computer interface using a canonical correlation analysis method. Journal of neural engineering, 6(4), 046002. https://doi.org/10.1088/1741-2560/6/4/046002
- fit(X, y, sample_weight=None)[source]#
Compute reference sinusoid signal.
These sinusoid are generated for each frequency in the dataset
- set_fit_request(*, sample_weight: Union[bool, None, str] = '$UNCHANGED$') SSVEP_CCA [source]#
Request metadata passed to the
fit
method.Note that this method is only relevant if
enable_metadata_routing=True
(seesklearn.set_config()
). Please see User Guide on how the routing mechanism works.The options for each parameter are:
True
: metadata is requested, and passed tofit
if provided. The request is ignored if metadata is not provided.False
: metadata is not requested and the meta-estimator will not pass it tofit
.None
: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str
: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED
) retains the existing request. This allows you to change the request for some parameters and not others.New in version 1.3.
Note
This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a
Pipeline
. Otherwise it has no effect.
- set_score_request(*, sample_weight: Union[bool, None, str] = '$UNCHANGED$') SSVEP_CCA [source]#
Request metadata passed to the
score
method.Note that this method is only relevant if
enable_metadata_routing=True
(seesklearn.set_config()
). Please see User Guide on how the routing mechanism works.The options for each parameter are:
True
: metadata is requested, and passed toscore
if provided. The request is ignored if metadata is not provided.False
: metadata is not requested and the meta-estimator will not pass it toscore
.None
: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str
: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED
) retains the existing request. This allows you to change the request for some parameters and not others.New in version 1.3.
Note
This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a
Pipeline
. Otherwise it has no effect.