LIBOL / SOL

Library for Scalable Online Learning
http://sol.stevenhoi.org
Other
97 stars 38 forks source link

Model update for new data point ? #2

Closed anujgupta82 closed 8 years ago

anujgupta82 commented 8 years ago

I am using python wrapper to use LIBSOL. I intialize the model as follows from python.libsol_core import Model m = Model(model_name = 'ogd', class_num = 2) I get the data in online fashion m.train('1st data point', 'svm', 1)

then I get the next data point and wish to further train the model on it, so should I do m.train('2nd data point', 'svm', 1) ?

yuewu001 commented 8 years ago

yeah, you can continuously call m.train() for new training samples. One thing you may need to pay attention to is that the first parameter is a path to data file. Currently we are working on new wrappers so that you can pass a numpy array or scipy.csr_matrix as training data

yuewu001 commented 8 years ago

in the new python interface, users can call m.fit() continuously for online learning. For C++ code, call m.Train().