2013/1/10 Gael Varoquaux <gael.varoqu...@normalesup.org>: > On Thu, Jan 10, 2013 at 03:57:23PM +1100, Juan Nunez-Iglesias wrote: >> More precisely, I think David wants a function that will take a set of RFs >> and >> return a new classifier object that does all the weighted averaging Andy >> suggested for you transparently. And the answer is no, sklearn doesn't have >> such a function. =) > > But it's fairly trivial to write an object that does that.
I think such a new method would be interesting as it could also be of interest for linear models. >>> clf1 = Perceptron().fit(X_bigdata_1, y_bigdata_1) On another machine >>> clf2 = Perceptron().fit(X_bigdata_2, y_bigdata_2) Then averaging the models: >>> clf3 = clf2.combine(clf1, copy=True) A type error would be raised if clf1 is of a type that could not be combined with clf2 (for instance if combining a linear model with a RF). Naive bayes models could also probably be extended to support such a combine method if they would also store the `n_samples` of the training set encountered at fit time as a new fitted attribute. Off course the exact semantics of such a "combiner" method would be model specific but the global expectation would be that combining two compatible models trained on distinct shards of the data would result in a model that generalize better than the original models even if not always strictly equivalent to fit a unique model on the concatenated data. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general