calc_performance_metrics: Compute performance metrics

Description Usage Arguments Value Author(s) Examples

View source: R/calc_performance_metrics.R

Description

Computes various measure to evaluate the performance of an algorithm

Usage

1
2
calc_performance_metrics(y_truth, y_output, pos_label, neg_label,
  print_out = TRUE)

Arguments

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.

Value

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

Author(s)

Priyanga Dilini Talagala

Examples

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")

pridiltal/oddwater documentation built on Dec. 18, 2019, 8:18 p.m.