On Thu, Jul 26, 2012 at 2:09 AM, Fred Mailhot <[email protected]>wrote:
> What I want to know is whether I can train an initial LogisticRegression
> classifier, then use its coef_ to initialize a SGDClassifier(loss="log")
> that would subsequently be updated via partial_fit() as new/more data come
> in? Or is there stuff going on under the hood that would preclude this?
>
Yes this is possible. You just need to pass warm_start=True in
SGDClassifier so that it doesn't overwrite coef_.
Note that it would make more sense to use SGDClassifier first to get in the
right direction very fast (SGD has first early convergence), then
LogisticRegression to finish off the job (will converge fast thanks to the
warm-starting). Unfortunately, LogisticRegression doesn't support the
warm_start option yet.
A relevant blog post is:
http://hunch.net/?p=2094
(Scroll down to read about warm-starting LBFGS with SGD)
Mathieu
------------------------------------------------------------------------------
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