Hey Farzana, The algorithm only keeps one batch in memory at a time. Between processing over each batch, SGD keeps a set of weights that it alters with each iteration of a data point or instance within a batch. This set of weights functions as the persisted state between calls of partial_fit. That means you will get the same results with SGD regardless of your batch size and you can choose your batch size according to your memory constraints. Hope that helps.
- Danny On Mon, Sep 9, 2019 at 5:53 PM Farzana Anowar <fad...@uregina.ca> wrote: > Hello Sir/Madam, > > I am going through the incremental learning algorithm in Scikit-learn. > SGD in sci-kit learn is such a kind of algorithm that allows learning > incrementally by passing chunks/batches. Now my question is: does > sci-kit learn keeps all the batches for training data in memory? Or it > keeps chunks/batches in memory up to a certain amount of size? Or it > keeps only one chunk/batch while training in memory and removes the > other trained chunks/batches after training? Does that mean it suffers > from catastrophic forgetting? > > Thanks! > > -- > Regards, > > Farzana Anowar > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn >
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn