我正在使用机器学习的SVM方法。当我使用模型对测试数据集进行预测时,我得到了所有NA。我认为问题出在kernlab。我该如何处理?任何建议将不胜感激。谢谢
library(e1071)
library(kernlab)
model_svm<-train(nzv[index,], trainSet.y, method='svmRadial', trControl=fitControl, tuneLength=6)
testSet$model_svm <- predict(model_svm, testSet)
testSet$model_svm <- predict(model_svm, testSet)
Warning message:
In method$predict(modelFit = modelFit, newdata = newdata, submodels = param) :
kernlab class prediction calculations failed; returning NAs
testSet $ model_svm [1] [25] 级别:N Y