train.control <- trainControl(method = "repeatedcv",number = 5, repeats = 3,classProbs = T)
model <- train(Classification ~., data = ds, method = "svmPoly",
trControl = train.control, metric="Accuracy")
print(model)
plot(model,main="SVM Poly")
confusionMatrix(model)
svmp <-predict(object=model,newdata=ds,type="prob")
如何使用“ svmp”作为源绘制ROC曲线?