##################################################
### Input data
###
## Load a dataset with 10 positives and 10 negatives
data(P10N10)
mdat <- mmdata(P10N10$scores, P10N10$labels)
mdat
##################################################
### ROC and Precision-Recall curves
###
curves <- evalmod(mdat)
curves
## Partial curves also report the partial AUCs
part(curves, xlim = c(0, 0.25))
##################################################
### Basic evaluation metrics
###
points <- evalmod(mdat, mode = "basic")
points
##################################################
### AUC with the U statistic
###
evalmod(mdat, mode = "aucroc")
##################################################
### One metric against another
###
metric_curve(mdat)
##################################################
### Per-class precision, recall and F-score
###
classification_report(mdat, at = 12)
Run the code above in your browser using DataLab