LinearSVC doesn't provide it as far as I can tell, however sklearn.svm.SVC,
which does allow you to
set 'probability=True' - which enables  probability estimates
This must be done before calling predict_proba.

http://scikit-learn.org/dev/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC

J

2012/4/6 Jaques Grobler <[email protected]>

> 'SVMs do not directly provide probability estimates, these are calculated
> using five-fold cross-validation, and thus performance can suffer'
>
> http://scikit-learn.org/dev/modules/svm.html#svm
>
>
> 2012/4/6 Lars Buitinck <[email protected]>
>
>> Op 5 april 2012 11:49 heeft  <[email protected]> het volgende
>> geschreven:
>> > I was wondering whether it is possible to output probability estimates
>> in sklearn.svm.LinearSVC.
>> >
>> > The underlying liblinear has the following option:
>> > -b probability_estimates: whether to output probability estimates, 0 or
>> 1 (default 0)
>> >
>> > But trying to activate it in scikit is not allowed:
>> > TypeError: __init__() got an unexpected keyword argument 'probability'
>>
>> Liblinear probability estimates are supported in its logistic
>> regression mode only, which in scikit-learn is available as
>> sklearn.linear_model[.sparse].LogisticRegression:
>>
>> http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html
>>
>> --
>> Lars Buitinck
>> Scientific programmer, ILPS
>> University of Amsterdam
>>
>>
>> ------------------------------------------------------------------------------
>> For Developers, A Lot Can Happen In A Second.
>> Boundary is the first to Know...and Tell You.
>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>> http://p.sf.net/sfu/Boundary-d2dvs2
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>
>
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to