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?

b.bhavesh
  • 59
  • 6
  • See my answer [here][1] to help with the "`something is wrong; all the ROC metric values are missing`" error you're having. [1]: http://stackoverflow.com/a/31467092/1710632 – KaanKaant Jul 18 '15 at 00:13

1 Answers1

0

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

topepo
  • 13,534
  • 3
  • 39
  • 52
  • I have tried it, now I am getting this **Something is wrong; all the ROC metric values are missing: Error in train.default(train, label, method = "C5.0", tuneLength = 10, : Stopping** and few warning messages also, saying **At least one of the class levels are not valid R variables names;** and **There were missing values in resampled performance measures.** – b.bhavesh Jun 04 '15 at 05:01