scikit-learn/scikit-learn — pull request #554 by mblondel (2012-01-13 15:38:56+00:00)
Title: partial_fit in SGD

I started to work on adding partial_fit to SGD. This turned out to be a bit harder than I thought...

* For classifications, I added a `classes` argument which is compulsory on the first call to partial_fit. Inferring the classes from `X` is prone to error: I got bitten while writing tests (some labels may be missing from `X`).

* When calling `partial_fit`, I wonder if I we should use `n_iter` or just set it to `1`. Currently I'm doing the former but it will probably bias the training if `X` is small.

* There was a bug in the intercept handling in the binary case (`intercept_` was an ndarray of shape `()`)

TODO:

* support for saving the current iteration number `t` (need modify the Cython code)

* more tests (including multiclass tests)

* merge the dense and sparse implementations

I'm hoping to finish this and get it merged as soon as possible as I need it for my work...