3

Is there any implementation of incremental svm which also has the feature of returning the probability of a given feature vector belonging to the various classes? Preferably usable with python code

I have heard about LaSVM. Does LaSVM has a feature of returning probability estimates? Also does it have features for handling imbalance training datasets?

user2115183
  • 851
  • 2
  • 9
  • 13

2 Answers2

1

You can have a look in Scikit Learn, a very flexible and efficient library written in Python

In every model, there are stored the internal calculated values. If clf is your SVM classifier, you can access clf.decision_function to see some explanation of the predictions.

It also provides a good set of tools for preprocessing data among other things you can find interesting.

cheers,

Community
  • 1
  • 1
Luchux
  • 803
  • 1
  • 7
  • 17
  • In scikit-learn, only linear SVMs can be trained incrementally (`SGDClassifier` with its `partial_fit` method). But that only supports probabilities when `loss="log"`, and it that case it trains LR instead of an SVM. – Fred Foo Jun 21 '13 at 21:22
0

For getting probability estimate you can use scikit-learn library. There are 2 alternatives you can use. One gives probabilities. Here is an example: How to know what classes are represented in return array from predict_proba in Scikit-learn And the other gives signed values for ranking (not probability but generally gives better result): Scikit-learn predict_proba gives wrong answers you should look at the answer.

Community
  • 1
  • 1
Bilal Dadanlar
  • 820
  • 7
  • 14