0

I copied the code from Multi-class classification in libsvm to get the probability estimates for each class.

However, I have an error in that my probability estimates p only has one column when there should be two columns. I checked my model and it states there are two classes (model.nr_class = 2) and (model.Label = [0;1]).

Can someone explain?

My probability estimates range from -0.35 to 1.2057 so they are not between 0 and 1. Giving the option -b 0 and -b 1 returns the same result.

Community
  • 1
  • 1
Anonymous
  • 1
  • 1

2 Answers2

0

I guess you miss the -b option in training. Check libsvm documentation.

kyamagu
  • 551
  • 2
  • 5
0

as you are having 2 classes, its clear that if the prob of class A is 0.xxxx then prob of another class is 1-0.xxxx, that you can clearly calculate...

kAmol
  • 1,297
  • 1
  • 18
  • 29