[R] Error: all the ROC metric values are missing:
Neha gupta
neh@@bo|ogn@90 @end|ng |rom gm@||@com
Wed Apr 15 23:32:03 CEST 2020
What is the problem is the code..
d=readARFF("CM1.arff")
index <- createDataPartition(d$Defective, p = .70,list = FALSE)
tr <- d[index, ]
ts <- d[-index, ]
index_2 <- createFolds(tr$Defective, returnTrain = TRUE, list = TRUE)
ctrl <- trainControl(method = "boot", number=100, index = index_2,
search="random", classProbs = TRUE,
summaryFunction=twoClassSummary,savePredictions = T)
net <- train(Defective ~ ., data = tr,
method = "nnet",
metric = "ROC",
preProc = c("center", "scale", "nzv" ),
trControl = ctrl, na.action=na.exclude)
getTrainPerf(net)
I am getting the error as below:
Something is wrong; all the ROC metric values are missing:
ROC Sens Spec
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :3 NA's :3 NA's :3
[[alternative HTML version deleted]]
More information about the R-help
mailing list