Andreas Mueller <amueller@...> writes: > > On 12/03/2012 09:39 PM, Afik Cohen wrote: > > No, we aren't doing multi-label classification, just multiclass. He was saying > > we could just use SGDClassifier directly, which is true, but AFAIK there is no > > way to get good prediction probability outputs on a per-class basis unless you > > train binary classifiers by wrapping it in a OneVsRestClassifier() call... or > > is there? > Hm it seems that the predict_proba is not implemented for multi-class. > I thought someone had done that already, sorry. > > It does train OVR and you can just take the sigmoid of the decision function > and than normalize. > Not sure why that is not implemented, I think we could basically > copy and paste that from logistic regression. >
Will this let us run SGDClassifier and show us per-class probability outputs? Again, that's the only reason we've been using OneVsRestClassifier. Let me explain what I mean by per-class probability, just in case it isn't clear: SGDClassifier's predict_proba() returns probability of belonging to each class, so if for example there are five classes, it will return something like [0.5, 0.3, 0.1, 0.05, 0.05]. For our use case, though, we need a negative/positive probability display, i.e. [(0.4, 0.5), (0.7, 0.3), (0.8, 0.2), (0.9, 0.1), (0.6, 0.4)] for five classes showing the probability that the input does not belong/does belong to that class, respectively. Thanks, Afik ------------------------------------------------------------------------------ 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
