| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/auc.R |
| 3 |
\name{auc} |
| 4 |
\alias{auc} |
| 5 |
\alias{auc.default} |
| 6 |
\alias{auc.glm} |
| 7 |
\alias{auc.randomForest} |
| 8 |
\alias{auc.glmerMod} |
| 9 |
\alias{auc.gbm} |
| 10 |
\alias{auc.rpart} |
| 11 |
\title{Area Under the Curve} |
| 12 |
\usage{ |
| 13 |
auc(...) |
| 14 |
|
| 15 |
\method{auc}{default}(actual, predicted, ...) |
| 16 |
|
| 17 |
\method{auc}{glm}(modelObject, ...) |
| 18 |
|
| 19 |
\method{auc}{randomForest}(modelObject, ...) |
| 20 |
|
| 21 |
\method{auc}{glmerMod}(modelObject, ...) |
| 22 |
|
| 23 |
\method{auc}{gbm}(modelObject, ...) |
| 24 |
|
| 25 |
\method{auc}{rpart}(modelObject, ...) |
| 26 |
} |
| 27 |
\arguments{ |
| 28 |
\item{\dots}{additional parameters to be passed the the s3 methods} |
| 29 |
|
| 30 |
\item{actual}{A vector of the labels. Can be \code{numeric, character, or factor}} |
| 31 |
|
| 32 |
\item{predicted}{A vector of predicted values} |
| 33 |
|
| 34 |
\item{modelObject}{the model object. Currently supported \code{glm, randomForest, glmerMod, gbm}} |
| 35 |
} |
| 36 |
\description{ |
| 37 |
Calculates the area under the curve for a binary classifcation model |
| 38 |
} |
| 39 |
\examples{ |
| 40 |
data(testDF) |
| 41 |
glmModel <- glm(y ~ ., data = testDF, family="binomial") |
| 42 |
Preds <- predict(glmModel, type = 'response') |
| 43 |
|
| 44 |
auc(testDF$y, Preds) |
| 45 |
# using s3 method for glm |
| 46 |
auc(glmModel) |
| 47 |
|
| 48 |
|
| 49 |
} |