Converting LinearSVC's decision function to probabilities (Scikit learn python )
Question: I use linear SVM from scikit learn (LinearSVC) for binary classification
problem. I understand that LinearSVC can give me the predicted labels, and the
decision scores but I wanted probability estimates (confidence in the label).
I want to continue using LinearSVC because of speed (as compared to
sklearn.svm.SVC with linear kernel) Is it reasonable to use a logistic
function to convert the decision scores to probabilities?

    
    
    import sklearn.svm as suppmach
    # Fit model:
    svmmodel=suppmach.LinearSVC(penalty='l1',C=1)
    predicted_test= svmmodel.predict(x_test)
    predicted_test_scores= svmmodel.decision_function(x_test) 
    

I want to check if it makes sense to obtain Probability estimates simply as [1
/ (1 + exp(-x)) ] where x is the decision score.

Alternately, are there other options wrt classifiers that I can use to do this
efficiently?

Thanks.


Answer: If you want speed, then just _replace_ the SVM with
`sklearn.linear_model.LogisticRegression`. That uses the exact same training
algorithm as `LinearSVC`, but with log-loss instead of hinge loss.

Using [1 / (1 + exp(-x))] will produce probabilities, in a formal sense
(numbers between zero and one), but they won't adhere to any justifiable
probability model.

