outlier.detection.cosine {OutSeekR}R Documentation

Cosine similarity

Description

Compute cosine similarity for detection of outliers. Generate theoretical quantiles based on the optimal distribution of the data, and compute cosine similarity between a point made up of the largest observed quantile and the largest theoretical quantile and a point on the line y = x. .

Usage

outlier.detection.cosine(x, distribution)

Arguments

x

A numeric vector.

distribution

A numeric code corresponding to the optimal distribution of x as returned by identify.bic.optimal.data.distribution().

Value

A number.

Examples

# Generate fake data.
set.seed(1234);
x <- rgamma(
    n = 20,
    shape = 2,
    scale = 2
    );
outlier.detection.cosine(
    x = x,
    distribution = 4
    );

[Package OutSeekR version 1.0.0 Index]