roc.train: Caret ROC

Description Usage Arguments Details Value See Also Examples

Description

Create ROC object directly from a caret model

Usage

1
2
## S3 method for class 'train'
roc(fit, outcome, ...)

Arguments

fit

caret model fit

outcome

string; outcome label

...

additional arguments passed to roc

Details

This returns an 'roc' object. Which you probably want to then pass to plot.

Value

An object of class 'roc'

See Also

roc
plot

Examples

1
2
3
4
5
6
7
8
data(aSAH)
  ctrl <- trainControl( classProb=TRUE, savePrediction=TRUE )
  fit <- train(
               outcome ~ gender + age + s100b + ndka, data=aSAH, method="rf"
               , trControl = ctrl
              )

  roc.train(fit) %>% plot( print.auc=TRUE, grid=TRUE)

decisionpatterns/caret.tools documentation built on May 15, 2019, 1:55 a.m.