Hello everyone I use the caret library to train a model and need to output ROC/AUC score, however, caret outputs 'Accuracy' and not ROC/AUC. The code is here cv.folds <- createMultiFolds(train$TYPE, k = 10, times = 3) ctrl <- trainControl(method = "cv",number=3, index = cv.folds, classProbs TRUE, summaryFunction = multiClassSummary) m= train(y = train_label, x = train_x, method = "rpart" , na.action = na.pass, metric = "ROC", preProc = c("center", "scale", "nzv"), trControl = ctrl) p=predict(m, test_x) confusionMatrix(p, as.factor(test_label)) [[alternative HTML version deleted]]
On Tue, 19 Apr 2022 19:08:37 +0200 Neha gupta <neha.bologna90 at gmail.com> wrote:> Hello everyone > > I use the caret library to train a model and need to output ROC/AUC > score, however, caret outputs 'Accuracy' and not ROC/AUC.Should you not be contacting the maintainer of the caret *package* (*NOT* library!!!) rather than R-help? (Type 'maintainer("caret") in the R console.) cheers, Rolf Turner P.S. Please read the posting guide; in particular learn how to post in *plain text* (not in html). R. T. -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276