performance_measures.RdFunction get_performance calculates the best performance measure when
prediction object is given.
get_performance(pred, measure)
get_max(pred, FUN)
AUC(pred)
tp(pred)
fp(pred)
fn(pred)
tn(pred)
cutoff(pred)
Se(pred)
Sp(pred)
J(pred)
Bac(pred)
Acc(pred)
Kappa(pred)
Wkappa(pred)
kappa_helper(pred, FUN_)
make_conf_matrix(TP, FN, FP, TN)An object of class prediction from package ROCR.
(string(1))
A string with the name of
classification performance measure to use. Currently
available options:
"bac" - for balanced accuracy (mean of sensitivity and specificity);
"kappa" - for Cohens kappa;
"wkappa" - for weighted Cohens kappa;
"j" - for Youden's index;
"auc" - for area under the ROC curve;
"acc" - for accuracy (total proportion of correctly identified cases).
Function to apply (one of
Acc,
Bac,
J,
Kappa,
Wkappa,
etc.)
Function to apply (either measure_kappa or
measure_wkappa)
Number of true positives.
Number of false negatives.
Number of false positives.
Number of true negatives.
Function get_performance returns a numeric vector with 2 elements:
the first element is the highest value of selected performance measure;
the second element is either corresponding cut-off value, or NA
if the measure is "auc".