Hello,

I've come across a strange error...


Here is what happens:

model <- svm(traindata,trainlabels, type="C-classification", 
kernel="radial", cost=10,  class.weights=c("win"=3,"lose"=1), 
scale=FALSE, probability = TRUE)
predictions <- predict(model, traindata)
pred <- prediction(predictions, trainlabels)


This returns an error:
Error in prediction(predictions, trainlabels) :
   Format of predictions is invalid.

Yet my predictions is just a matrix of predicted labels.  Nothing 
fancy.  (In fact, my step follow the exact example on the ROCR homepage.)

A search through google for "Format of predictions is invalid" returns 
zero results.

Can anyone suggest how I might fix this problem?

Thank You,





        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to