All implemented Measures call confusion_measures() with the respective type internally. For the F1 measure, use MeasureClassifFScore.

Format

R6::R6Class() inheriting from MeasureClassif.

Construction

MeasureClassifConfusion$new(id = type, type)

mlr_measures("classif.tp")
mlr_measures("classif.fn")
mlr_measures("classif.fp")
mlr_measures("classif.tn")
mlr_measures("classif.tpr")
mlr_measures("classif.fnr")
mlr_measures("classif.fpr")
mlr_measures("classif.tnr")
mlr_measures("classif.ppv")
mlr_measures("classif.fdr")
mlr_measures("classif.for")
mlr_measures("classif.npv")
mlr_measures("classif.dor")
mlr_measures("classif.precision")
mlr_measures("classif.recall")
mlr_measures("classif.sensitivity")
mlr_measures("classif.specificity")

msr("classif.tp")
msr("classif.fn")
msr("classif.fp")
msr("classif.tn")
msr("classif.tpr")
msr("classif.fnr")
msr("classif.fpr")
msr("classif.tnr")
msr("classif.ppv")
msr("classif.fdr")
msr("classif.for")
msr("classif.npv")
msr("classif.dor")
msr("classif.precision")
msr("classif.recall")
msr("classif.sensitivity")
msr("classif.specificity")

See also

Dictionary of Measures: mlr_measures

as.data.table(mlr_measures) for a complete table of all (also dynamically created) Measure implementations.

Examples

task = tsk("german_credit") learner = lrn("classif.rpart") p = learner$train(task)$predict(task) measures = list(msr("classif.sensitivity"), msr("classif.specificity")) round(p$score(measures), 2)
#> classif.sensitivity classif.specificity #> 0.90 0.57