Skip to content
Prev 86685 / 398513 Next

getting probabilities from SVM

Correct. 

Just for the records, the rationale behind this `tricky' design:

In addition to probabilites, predict.svm() (more precisely: libsvm) can also compute the decision values. Common ways to handle `polymorph' prediction types are, e.g, using a `type' argument in the predict() function, or to return all variants in one list object. With a `type' argument, you need several calls to predict() if you need, say, hard predictions _and_ the probabilities. On the other hand, the probability and decision values features were added to libsvm only when svm() in e1071 had already been around for a while, so returning a list instead of a vector would have broken a lot of code. So I decided to keep the `standard' predict behavior and to `hide' special predictions in an attribute. If the latter had been available from the beginning, I probably would have used the `type' approach.

Cheers,
David
On 2/16/06, roger bos <roger.bos at gmail.com> wrote: