kdeos: KDEOS Outlier score calculation

Description Usage Arguments Value See Also Examples

View source: R/outlier_lof.R

Description

kdeos returns the KDEOF Outlier score for every observation in the given data_matrix. Kernel density estimation in combination with LOF is used to calculate outlier score.

Usage

1
2
3
4
5
6
7
8
kdeos(
  data_matrix,
  k_min,
  k_max = k_min,
  kernel_scale = NA,
  min_bandwidth = NA,
  idim = NA
)

Arguments

data_matrix

numeric Matrix containing data the outlier score is calculated for. Rows are treated as observations, columns as features.

k_min

Number. Minimum Neighbourhood-size used to calculate outlier scores.

k_max

Number. Maximum Neighbourhood-size used to calculate outlier scores. Defaults to k_min

kernel_scale

Number. Kernel scaling parameter. If NA, ELKI's default is used (0.25).

min_bandwidth

Number. Minimum bandwidth for kernel density estimation. If NA, ELKI's default is used (0).

idim

Number. Intrinsic dimensionality of this data set. If NA, ELKI's default is used (-1, implies using true data dimensionality).

Value

List of outlier scores. The score at position x belongs to the observation given in row x of the original data_matrix.

See Also

https://elki-project.github.io/releases/release0.7.5/javadoc/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.html for ELKI documentation.

Examples

1
2
3
4
5
6
data_matrix <- matrix(c(1:30), nrow=10, ncol=3)
result      <- kdeos(data_matrix, 3)
for(index in c(1:10)) {
    print(paste('Observation:', paste(data_matrix[index,], collapse=',')))
    print(paste('Score:',       result[index]))
}

lenaWitterauf/rElki documentation built on June 2, 2020, 9:24 p.m.