Finally figured it out.  You have to extract it from the attributes.
Tricky.  Thanks anyway.

> attr(pred, "prob")[1:10,]


On 2/16/06, roger bos <roger.bos@gmail.com> wrote:
>
> I am using SVM to classify categorical data and I would like the
> probabilities instead of the classification.  ?predict.svm says that its
> only enabled when you train the model with it enabled, so I did that, but it
> didn't work.  I can't even get it to work with iris.  The help file shows
> that probability = TRUE when training the model, but doesn't show an
> example.  Then I try to predict with probabilities, I still only get
> classifications back.  Anyone get this to work and can help me out?
>
>
> Thanks,
>
> Roger
>
> attach(iris)
>
>      # alternatively the traditional interface:
>      x <- subset(iris, select = -Species)
>      y <- Species
>      model <- svm(x, y, probability = TRUE)
>      pred <- predict(model, x, probability = TRUE)
>

	[[alternative HTML version deleted]]


