[R] Error: all the ROC metric values are missing:

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Wed Apr 15 23:55:13 CEST 2020


Someday, Neha, you will learn to post a reproducible example using plain text. I hope.

Try using the reprex package.

On April 15, 2020 2:32:03 PM PDT, Neha gupta <neha.bologna90 using gmail.com> wrote:
>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]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list