Description Usage Arguments Value Author(s) See Also Examples
View source: R/calculate_performance.R
Performance measures for twoclass classification
1  calculate_performance(truth, prediction, pos_label = levels(truth)[2])

truth 
( 
prediction 
A vector with predicted classes. 
pos_label 
( 
A matrix with the following columns:
tp
(number of true positives),
fn
(number of false negatives),
fp
(number of false positives),
tn
(number of true negatives),
sens
(sensitivity),
spec
(specificity),
ppv
(positive predictive value),
npv
(negative predictive value),
youden
(Youden's j index),
kappa
(Cohen's kappa).
attribute labels
contains a named vector with elements
pos_label
and neg_label
, which indicate labels of
positive and negative groups respectively.
Vilmantas Gegzna
Other functions for ROC: access_elements
,
print.as_str
,
roc_performance_measures
,
roc_predict
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")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.