b.bhavesh
b.bhavesh

Reputation: 59

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?

Upvotes: 0

Views: 634

Answers (1)

topepo
topepo

Reputation: 14331

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

Upvotes: 0

Related Questions