[Mne_analysis] GeneralizingEstimator with incremental learning / .partial_fit

Jean-Rémi KING jeanremi.king at gmail.com
Wed Aug 5 13:17:24 EDT 2020
Search archives:

        External Email - Use Caution        

Hi Giulia,

I think you should be able to change the method:

model = sklearn.linear_model.SGDClassifier()
model.fit = model.partial_fit
slider = mne.decoding.SlidingEstimator(model)
for X, y in train_batches:
    slider.fit(X, y)

Best

JR

On Wed, 5 Aug 2020 at 18:40, Giulia Gennari <giulia.gennari1991 at gmail.com>
wrote:

>         External Email - Use Caution
>
> Hi!
>
> I would need to try decoding with incremental learning (EEG data).
> I was planning to use logistic regression by means of the SGDClassifier
> <https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html>
>  .
> I would then need to call .partial_fit to make my estimator learn on each
> of my training sets.
> However:
>
> 'GeneralizingEstimator' object has no attribute 'partial_fit'
>
> Same issue for SlidingEstimator.
> Is there a way to work around this limitation?
>
> Thank you so so much in advance!
>
> Giulia Gennari
> _______________________________________________
> 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/20200805/f78eff5e/attachment.html 


More information about the Mne_analysis mailing list