[Mne_analysis] Number of components to use in CSP

Mainak Jas mainakjas at gmail.com
Tue Jul 23 12:18:17 EDT 2019
Search archives:

        External Email - Use Caution        

Hi,

I would say neither. You can think of CSP a bit like PCA where instead of
maximizing the variance, you are trying to maximize the variance of the
difference between the two classes. Just as in PCA you need to select the
number of components for explaining your variance. But here you also have a
prediction task involved. Thus, if you capture two much of the difference
(too many components), you will overfit and if it's too few, you will
underfit. That's why we recommend setting this parameter by
cross-validation.

Hope that helps.

Best,
Mainak

On Tue, Jul 23, 2019 at 9:04 AM A S <eng.emetsasa at gmail.com> wrote:

>         External Email - Use Caution
>
> Hi all,
> How to define  "n_components" in the following function:
> mne.decoding.CSP(n_components=4, reg=None, log=None, cov_est='concat',
> transform_into='average_power', norm_trace=False,
> cov_method_params=None, rank=None)
>
> Is it dependent on the number of classes i have?
> can i have it to be more than 4? for example 25?
> Is is dependent on the number of electrodes (channels) i have?
>
> many thanks in advance for your help
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190723/2a9d9ebf/attachment.html 


More information about the Mne_analysis mailing list