Description Usage Arguments Value Author(s) Examples
Calculate ROC curves
1 2 3 4 5 6 7 8 9 10 |
result |
Modeling results, as returned by |
y |
True response vector used to create |
resample |
Resampling scheme used to create |
class |
The class of interest to create ROC-curves for. |
statistic |
The name of the statistic (as returned by the prediction function of the modeling procedure). |
x |
Roc curve object, as returned by |
... |
Sent to |
A data frame of class “roc”.
Christofer Bäcklin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Generate some noisy data
my.data <- iris
my.data[1:4] <- my.data[1:4] + 2*rnorm(150*4)
# Train and evaluate some classifiers
procedure <- list(lda = modeling_procedure("lda"),
qda = modeling_procedure("qda"))
cv <- resample("crossvalidation", iris$Species, nrep=1, nfold=3)
result <- evaluate(procedure, my.data[-5], my.data$Species, resample=cv)
# Study the performance
select(result, fold=TRUE, method=TRUE, error="error")
roc <- roc_curve(result, my.data$Species, cv)
plot(roc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.