Question

I'm using LIBSVM for matlab. When I use a regression SVM the probability estimates it outputs are an empty matrix, whereas this feature works fine when using classification. Is this a normal behavior, because in the LIBSVM readme it says:

-b probability_estimates: whether to train a SVC or SVR model for probability estimates,
   0 or 1 (default 0)
Was it helpful?

Solution

[~,~,P] = svmpredict(x,y,model,'-b 1');

The output P is the probability of y belongs to class 1 and -1 respectively (m*2 array), and it only makes sense for classification problem.

For regression problem, the pairwise probability information is included in your trained model with model.ProbA.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top