插入符号ROC度量标准中的错误:“出错了;缺少所有ROC度量标准值”

时间:2016-09-08 18:08:45

标签: r machine-learning r-caret roc

我正在使用SVM进行练习。我正在使用mlbench的PMIndianDiabetes。

library(caret) 
library(mlbench)
data(PimaIndiansDiabetes)
x=PimaIndiansDiabetes[,1:8]
y=PimaIndiansDiabetes[,9]
control=trainControl(
      method = "repeatedcv", number = 5,
      repeats = ,classProbs=TRUE,summaryFunction=twoClassSummary)
      set.seed(998) 
      svm.tune<- train(x,y, 
               method = "svmRadial", # Radial kernel 
               preProc = c("center","scale"), # Center and scale data 
               trControl=control,metric="ROC")

我收到的消息是:

Something is wrong; all the ROC metric values are missing:
      ROC           Sens             Spec       
  Min.   : NA   Min.   :0.8650   Min.   :0.5537  
  1st Qu.: NA   1st Qu.:0.8695   1st Qu.:0.5621  
  Median : NA   Median :0.8740   Median :0.5704  
  Mean   :NaN   Mean   :0.8717   Mean   :0.5705  
  3rd Qu.: NA   3rd Qu.:0.8750   3rd Qu.:0.5789  
  Max.   : NA   Max.   :0.8760   Max.   :0.5873  
  NA's   :3                                      
  Error in train.default(x, y, method = "svmRadial", preProc = c("center",           : 
  Stopping
 In addition: Warning message:
 In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :
 There were missing values in resampled performance measures.

我检查了列,它们有有效的R名称,检查有两个因素,数据中没有NA,还有什么?????

0 个答案:

没有答案