Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-04-02 Thread ShNaYkHs ShNaYkHs
I used the following function for predicting probabilities with SGD in multi-class case. But I very usually get "nan": RuntimeWarning: invalid value encountered in divide prob /= prob.sum(axis=1).reshape((prob.shape[0], -1)). and RuntimeWarning: overflow encountered in exp np.exp(prob, prob). def

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-26 Thread Lars Buitinck
Please review https://github.com/scikit-learn/scikit-learn/pull/1814 -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Own the Future-IntelĀ® Level Up Game Demo Contest 2013 Rise to greatness in Inte

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-26 Thread Paolo Losi
On Tue, Mar 26, 2013 at 3:55 AM, Mathieu Blondel wrote: > On Tue, Mar 26, 2013 at 1:41 AM, Olivier Grisel > wrote: > > > I am also +1 a simple short term solution while still keeping longer > > terms goal for > > - proper multinomial penalized LR on one hand, > > It would still be nice to have it

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-26 Thread Alexandre Gramfort
> +1 for simple normalization in SGDClassifier.predict_proba and a > meta-estimator approach for > calibrating probability outputs (finishing @agramfort's PR would be a > great topic for the next sprint). that's my plan unless somebody beats me to it. Alex ---

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Mathieu Blondel
On Tue, Mar 26, 2013 at 1:41 AM, Olivier Grisel wrote: > I am also +1 a simple short term solution while still keeping longer > terms goal for > - proper multinomial penalized LR on one hand, It would still be nice to have it but if Paolo is correct, we should not expect it to produce well-calib

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Olivier Grisel
2013/3/25 Paolo Losi : > My 2 cents ... > > The problem is that penalized (l1 o l2) single class Logistic Regression is > not > well calibrated to start with. > In other terms: the penalization param value that optimizes classification > accuracy is not > guaranteed to be the one that maximizes pro

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Paolo Losi
My 2 cents ... The problem is that penalized (l1 o l2) single class Logistic Regression is not well calibrated to start with. In other terms: the penalization param value that optimizes classification accuracy is not guaranteed to be the one that maximizes probability estimation accuracy. Optimiz

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Mathieu Blondel
On Mon, Mar 25, 2013 at 10:57 PM, Lars Buitinck wrote: > You mean the score rescaling at the end of section 2? What Zadrozny > and Elkan really seem to be recommended is isotonic regression... The question is how to deal with the *multiclass* case, which isotonic regression cannot handle directl

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Lars Buitinck
2013/3/25 Mathieu Blondel : >> I'm confused. Since when is that so? The other losses definitely support >> OvR multi-class. I would be quite surprised if 'log' does not. > > predict_proba currently raises an exception in the multiclass case: > https://github.com/scikit-learn/scikit-learn/blob/maste

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Mathieu Blondel
On Mon, Mar 25, 2013 at 9:19 PM, Andreas Mueller wrote: > I'm confused. Since when is that so? The other losses definitely support > OvR multi-class. I would be quite surprised if 'log' does not. predict_proba currently raises an exception in the multiclass case: https://github.com/scikit-learn/

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-25 Thread Andreas Mueller
On 03/23/2013 06:37 PM, ShNaYkHs ShNaYkHs wrote: > Well, I need a classifier in that can support partial_fit() and can > give a probability for prediction proba_predict() (in case of > multi-class, not only binary). PassiveAggressiveClassifier and > Perceptron have no proba_predict() method, and

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-24 Thread ShNaYkHs ShNaYkHs
So can you tell me how to add multiclass support in SGDClassifier.predict_proba ? 2013/3/24 Mathieu Blondel > On Sun, Mar 24, 2013 at 11:41 AM, Mathieu Blondel > wrote: > > > If you use a recent version of scikit-learn, you should be able to do > this: > > ovr = OneVsRestClassifier(SGDClassifie

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-23 Thread Mathieu Blondel
On Sun, Mar 24, 2013 at 11:41 AM, Mathieu Blondel wrote: > If you use a recent version of scikit-learn, you should be able to do this: > ovr = OneVsRestClassifier(SGDClassifier(loss="log")) > ovr.fit(X_train, y_train) > prob = ovr.predict_proba(X_test) Ah, right, you want to use partial_fit so m

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-23 Thread Mathieu Blondel
On Sun, Mar 24, 2013 at 7:37 AM, ShNaYkHs ShNaYkHs wrote: > Well, I need a classifier in that can support partial_fit() and can give a > probability for prediction proba_predict() (in case of multi-class, not only > binary). PassiveAggressiveClassifier and Perceptron have no proba_predict() > meth

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-23 Thread ShNaYkHs ShNaYkHs
Well, I need a classifier in that can support partial_fit() and can give a probability for prediction proba_predict() (in case of multi-class, not only binary). PassiveAggressiveClassifier and Perceptron have no proba_predict() method, and SGDClassifier have a proba_predict() method but supported o

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-03-01 Thread amueller
sgdclassifier using partial_fit. I want to do naive bayes soon ShNaYkHs ShNaYkHs schrieb: >Is there any incremental classifier in sklearn, that can be trained >incrementally considering one data-point at a time ? An existing one or >under >development one .. > > >-

Re: [Scikit-learn-general] Any incremental classifier for sklearn

2013-02-28 Thread Olivier Grisel
2013/2/28 ShNaYkHs ShNaYkHs : > Is there any incremental classifier in sklearn, that can be trained > incrementally considering one data-point at a time ? An existing one or > under development one .. Yes have a look at models that have a `partial_fit` method, for instance SGDClassifier, PassiveAg

[Scikit-learn-general] Any incremental classifier for sklearn

2013-02-28 Thread ShNaYkHs ShNaYkHs
Is there any incremental classifier in sklearn, that can be trained incrementally considering one data-point at a time ? An existing one or under development one .. -- Everyone hates slow websites. So do we. Make your web a