Hi all,

I'm using SVM to classify data (2 classes) and I get strange results :

> model = svm(x, y, probability = TRUE)

> pred = predict(model, x, decision.values = TRUE, probability = FALSE)
> table(pred,y)
     y
pred  ctl nuc
  ctl  82   3
  nuc   5  84

> pred
  1   2   3   4   5   6   7   8 ....
nuc nuc nuc nuc nuc nuc nuc ctl ....

And now, with probabities computation :

> pred = predict(model, x, decision.values = TRUE, probability = TRUE)
> table(pred,y)
     y
pred  ctl nuc
  ctl   7  84
  nuc  80   3

> pred
  1   2   3   4   5   6   7   8 ....
ctl ctl ctl ctl ctl ctl ctl nuc ...

However, model, x, and y didn't change !! Also, decision.values didn't
change :

         nuc/ctl
1    0.505289854
2    0.265975135
3    0.863270144
4    0.354181677
5    0.868119168
6    0.702989607
7    0.206018067
8   -0.271452937 -> ctl is correct !
....

Is it a bug ? Could you explain the difference ?

Best regards,

charles

-- 
Charles Hébert

DYnamique et Organisation des GENomes,
Laboratoire de Génétique Moléculaire, CNRS UMR 8541
Ecole Normale Supérieure 46, rue d'Ulm 75005 Paris, France

	[[alternative HTML version deleted]]

