简体   繁体   中英

Error while running caret with C5.0

I am trying code given in caret vignette and applying it on my data link . I am using this code to evaluate C5.0 with 10-fold cross validation and ROC metric on my data:

tuned <- train (training, class, method="C5.0", tuneLength=11, tuneGrid=expand.grid(.model="tree",.trials=c(1:100),.winnow=FALSE),trC=trainCont‌​rol(method="repeatedcv",repeats=5,summaryFunction=twoClassSummary,classProbs=TRUE), metric="ROC")

Here, training is training data without class label and class is respective class label.

However I got this error:

Error in evalSummaryFunction(y, wts = weights, ctrl = trControl, lev = classLevels, : train()'s use of ROC codes requires class probabilities. See the classProbs option of trainControl()

Can someone point out where am I wrong?

Use trControl instead of trC . Also, you don't need periods in front of the tuning parameter names anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM