Learn R Programming

UAHDataScienceO (version 1.0.0)

compare_univariate_methods: Compare Univariate Outlier Detection Methods

Description

Compares univariate outlier detection methods on the flattened dataset

Usage

compare_univariate_methods(data, methods, params)

Value

None, produces a visualization matrix comparing the outliers detected by each method.

Arguments

data

Input dataset (must be a data.frame)

methods

Vector of method names to compare. Available methods are: "z_score", "boxandwhiskers"

params

List of parameters for each method. Must contain named lists:

  • z_score: list(d=numeric)

  • boxandwhiskers: list(d=numeric)

Author

Andriy Protsak

Examples

Run this code
inputData = t(matrix(c(3,2,3.5,12,4.7,4.1,5.2,
4.9,7.1,6.1,6.2,5.2,14,5.3),2,7,dimnames=list(c("r","d"))))
inputData = data.frame(inputData)
methods = c("z_score", "boxandwhiskers")
params = list(
  z_score = list(d=2),
  boxandwhiskers = list(d=2)
)
compare_univariate_methods(inputData, methods, params)

Run the code above in your browser using DataLab