[Mne_analysis] Number of components to use in CSP

A S eng.emetsasa at gmail.com
Wed Jul 24 17:30:33 EDT 2019
Search archives:

        External Email - Use Caution        

Thank you very much Mainak

Mainak Jas <mainakjas at gmail.com>, 23 Tem 2019 Sal, 18:18 tarihinde şunu yazdı:
>
>         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
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



-- 
Sasah



More information about the Mne_analysis mailing list