smartcorelib / smartcore

A comprehensive library for machine learning and numerical computing. The library provides a set of tools for linear algebra, numerical computing, optimization, and enables a generic, powerful yet still efficient approach to machine learning.
https://smartcorelib.org/
Apache License 2.0
702 stars 76 forks source link

incremental learning #46

Open julama opened 3 years ago

julama commented 3 years ago

Hey, thanks for sharing this project! Is incremental learning supported by smartcore; something like partial_fit from sk-learn?

VolodymyrOrlov commented 3 years ago

Hi Julian, this is a great direction to explore. I personally do not use partial_fit to train my models, but I can see where incremental learning might be useful. I know Scikit-learn provides only a handful of incremental estimators, which one are you interested in?

julama commented 3 years ago

The reason why I'm interested in partial_fit or mini-batches is that I want to train the model on devices with very restricted memory. At the moment I'm mostly interested in naive bayes and SVM.

Another restriction I have is that I can't use floating-point numbers. I'll try to change the crate math::num::RealNumber to support rust_decimal.

VolodymyrOrlov commented 3 years ago

We definitely can add partial_fit to the Support Vector Classifier, since the implementation we use is designed for incremental learning. Naive Bayes was implemented by Luis Moreno but it seems to me that we can add partial_fit to all NB variants we support, do you agree, @morenol?

@julama let me know if you want to work on this issue. In any case we can plan this story for next release (v0.3.0). Also, can I ask you to create a separate issue for rust_decimal (I want to keep these two stories separately)?

morenol commented 3 years ago

Yes, I think that we can add that support for the NB variants that we have implemented. I can help with that.

julama commented 3 years ago

let me know if you want to work on this issue. In any case we can plan this story for next release (v0.3.0). Also, can I ask you to create a separate issue for rust_decimal (I want to keep these two stories separately)?

Yes, I'm interested to work on it. I just started learning rust but I will give it a try.