Am 06.12.2012 19:44, schrieb Rich Jones: > Bummer! > > Still, this could be something that I'm able to tackle, and if you're > willing to help me figure out how to implement it, I'm willing to > write all of the docs/tests if necessary, too. > > What do you think my plan of attack should be? Thanks for volunteering to work on this. It would be a great contribution.
As you are interested in the Gaussian version, maybe just start with this. I am no expert in the NB business, but I think it should be quite straight forward. In the "fit" function, what is done is estimate the mean and variance for each feature per class. So you add a new function called "partial_fit", that does the same, but incrementally. For that you can just also store the incremental statistics of the data and update these at each call to "partial_fit". For the mean, this is very easy: just keep accumulating and remember how many points you had already. (It might be a bit more stable if you remember the number of points and the mean so that the sum doesn't grow to large). For the variance, maybe take a look at the wikipedia page: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance I think the "online algorithm" is the thing we want. Don't hesitate to submit an early pull request, which makes it easier to talk about the code and provides a good platform for discussion. If you need more input before the start, just ask. Be sure to read the coding guidelines: http://scikit-learn.org/dev/developers/index.html#coding-guidelines and probably also the API docs. Thanks again, Andy ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
