gbm - R - Caret - Using ROC instead of accuracy in model training -


Hi my name and I'm using the carat to create a GBM tree-based model. Although accuracy instead of my metrics

want to use ROC as there are code I have so far

  myTuneGrid & lt; - expand.grid (n.trees = 500, interaction.depth = 11, shrinkage = 0.1) fitControl & lt; - trainControl (method = "repeatedcv", number = 7, repeats = 1, verboseIter = FALSE, returnResamp = "all", classProbs = TRUE) myModel & lt; - Train (Cover_Type ~., Data = modelData, method = "GBM", trControl = fitControl, tuneGrid = myTuneGrid, metric = 'ROC')   

However, when I run this code I Warning

  Warning message: in train.default (x, y, weight = w, ...): The metric "roc" result was not in the set. Instead, accuracy will be used   

How do I use rock instead of my model of purity? What am I doing wrong here?

Is there a link to the GitHub project for the source code?

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -