Description Usage Arguments Value Author(s) Examples
View source: R/calc_performance_metrics.R
Computes various measure to evaluate the performance of an algorithm
1 2 | calc_performance_metrics(y_truth, y_output, pos_label, neg_label,
print_out = TRUE)
|
y_truth |
A character vector containing the gorund truth |
y_output |
a character vector containing the predicted labels from the algorithm |
pos_label |
A character string. Label used to indicate the outliers in the original dataframe. |
neg_label |
A character string. Label used to indicate the typical values in the original dataframe. |
print_out |
If TRUE, output will be printed to console. |
A list with the following elements:
TN |
True negatives |
FN |
False negatives |
FP |
False positives |
TP |
True positives |
Accuracy |
Accuracy |
Error_Rate |
Error Rate |
Sensitivity |
Sensitivity |
Specificity |
Specificity |
Precision |
Precision |
Recall |
Recall |
F_Measure |
F Measure |
Optimised_Precision |
Optimised Precision |
PPV |
Positive Predictive Value |
NPV |
Negative Predictive Value |
Priyanga Dilini Talagala
1 2 3 4 5 6 | true_labels <- c("out", "out", "normal", "out", "normal", "normal",
"normal", "normal", "normal", "normal")
output <- c("out", "normal", "normal", "normal", "out", "out",
"normal", "normal", "normal", "normal")
out<- calc_performance_metrics(y_truth = true_labels, y_output = output,
pos_label = "out", neg_label = "normal")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.