Hi George, there is Platt scaling, which will turn your decision function into something in the interval [0, 1]. However, these aren't really probabilities (don't correspond to any probabilistic model). sklearn.svm.SVC(kernel="linear", probability=True) provides a `predict_proba` for you via this method, but not sklearn.svm.LinearSVC. However, I am assuming you are choosing LinearSVC for scalability reasons. In that case you should maybe consider a switch to LogisticRegression, which uses the same backend library Liblinear, and gives you access to a more justifiable `predict_proba`.
HTH, Michael On Thu, Oct 23, 2014 at 4:21 PM, George Bezerra <gbeze...@gmail.com> wrote: > I'm using the LinearSVC module but I noticed that it doesn't implement a > predict_proba method, only the decision_function method. > > Is there a simple way to get the probabilities that a data point belongs > to a class for this model? > > Thanks. > > -- > George Bezerra > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general > >
------------------------------------------------------------------------------
_______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general