LinearSVC does not predict probabilities but the linear decision
function is made available as the decision_function method.

It should be possible to train a calibration model to turn those raw
decision values as probabilities using an IsotonicRegression model [1]
and cross-validation.

There is no turn-key utility function to do so in scikit-learn but you
have the building blocks and the method is provided in:

http://machinelearning.wustl.edu/mlpapers/paper_files/icml2005_Niculescu-MizilC05.pdf

Alternatively as Lars said, you can use
sklearn.linear_model.LogisticRegression and use the predict_proba
method to get the class assignment probabilities.

If you have many samples you can also try SGDClassifier with a log or
modified_huber loss to get penalized linear models with a
predict_proba method.

[1] http://scikit-learn.org/stable/auto_examples/plot_isotonic_regression.html

-- 
Olivier

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to