powered by
Calculates the area under the curve for a binary classifcation model
auc(...)# S3 method for default auc(actual, predicted, ...)# S3 method for glm auc(modelObject, ...)# S3 method for randomForest auc(modelObject, ...)# S3 method for glmerMod auc(modelObject, ...)# S3 method for gbm auc(modelObject, ...)# S3 method for rpart auc(modelObject, ...)
# S3 method for default auc(actual, predicted, ...)
# S3 method for glm auc(modelObject, ...)
# S3 method for randomForest auc(modelObject, ...)
# S3 method for glmerMod auc(modelObject, ...)
# S3 method for gbm auc(modelObject, ...)
# S3 method for rpart auc(modelObject, ...)
additional parameters to be passed the the s3 methods
A vector of the labels. Can be numeric, character, or factor
numeric, character, or factor
A vector of predicted values
the model object. Currently supported glm, randomForest, glmerMod, gbm
glm, randomForest, glmerMod, gbm
# NOT RUN { data(testDF) glmModel <- glm(y ~ ., data = testDF, family="binomial") Preds <- predict(glmModel, type = 'response') auc(testDF$y, Preds) # using s3 method for glm auc(glmModel) # }
Run the code above in your browser using DataLab