calculate_performance: Performance measures for two-class classification

Description Usage Arguments Value Author(s) See Also Examples

View source: R/calculate_performance.R

Description

Performance measures for two-class classification

Usage

1
calculate_performance(truth, prediction, pos_label = levels(truth)[2])

Arguments

truth

(factor)
A factor vector with "true"/reference classes.

prediction

A vector with predicted classes.

pos_label

(character(1))
A string with the name of positive group. By default, the second level of factor truth is treated as positive.

Value

A matrix with the following columns:



Author(s)

Vilmantas Gegzna

See Also

Other functions for ROC: access_elements, print.as_str(), roc_performance_measures, roc_predict()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
(truth <- gl(n = 2, k = 3, length = 20, labels = c("H", "S")))

(prediction <- rev(truth))


calculate_performance(truth, prediction)

calculate_performance(truth, prediction, pos_label = "S")

calculate_performance(truth, prediction, pos_label = "H")

GegznaV/multiROC documentation built on Sept. 15, 2020, 10:33 a.m.