Skip to contents

This function evaluates the performance of the outlier detection algorithm.

Usage

evaluateOutliers(original_data, anomaly_data, anomaly_result)

Arguments

original_data

A data frame containing the original data.

anomaly_data

A data frame containing the anomaly data.

anomaly_result

A data frame containing the predicted anomalies.

Value

A data frame containing the evaluation metrics.

Examples

anomaly_data <- generateOutliers(iris, p = 0.05, sd_factor = 5, seed = 123)
qrf<- outqrf(anomaly_data)
#> 
#> Outlier identification by quantiles random forests
#> 
#>   Variables to check:		Sepal.Length, Sepal.Width, Petal.Length, Petal.Width
#>   Variables used to check:	Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species
#> 
#>   Checking: Sepal.Length  Sepal.Width  Petal.Length  Petal.Width  
evaluateOutliers(iris,anomaly_data,qrf$outliers)
#>     Actual  Predicted      Cover   Coverage Efficiency 
#>       32.0       16.0       16.0        0.5        1.0