2012/5/11 Mathieu Blondel <[email protected]>: > All algorithms which supports a warm_start constructor option should also be > usable similarly to partial_fit. For example: > > from sklearn.linear_model import Lasso > > clf = Lasso(warm_start=True) > clf.fit(X_subset1, y_subset1) > clf.fit(X_subset2, y_subset2) > ... > > Another idea is to learn a different classifier on each subset and use a > mixture of the classifiers. As a mixture weight, a simple choice is 1 / > n_mixtures. > > clf = LinearSVC() > clf.fit(X_subset1, y_subset1) > clf2 = LinearSVC() > clf2.fit(X_subset2, y_subset2) > clf.coef_ += clf.coef_ > ... > clf.coef_ /= n_mixtures
Unfortunately I don't think you can assign coef_ on liblinear wrapper models due to internal memory layout constraints. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
