getLocalDescription: Get the local description of an observation.

Description Usage Arguments Value Author(s) Examples

Description

Uses the k nearest neighbours of observation x. From those observations the most dense [k*alpha] observations are used to provide a projection onto the [k*alpha] oberservations. The orthogonal distance to this projection space and the score distance within this projection space, based on the covariance of the [k*alpha] observations are calculated for each observation from the dataset.

Usage

1
getLocalDescription(data, center, dist=NULL, k=20, alpha=0.5)

Arguments

data

A dataset, with n rows and p variables. Any matrix or data frame can be handed over.

center

An index of data, which defines the observation initiating the projection process.

dist

A distance matrix of data. If no distance matrix is provided, it will be calculated using dist(data). The parameter is used in order to make the calculation more efficient.

k=20

the number of nearest neighbours considered. k further influences the dimension of the projection space [k*alpha] at the same time.

alpha

The robustness parameter for the estimation of the covariance matrix. It further influences the dimension of the projection space.

Value

od

A vector of orthogonal distances of each observation with respect to the space spanned by the core observations.

cd

A vector of core distances of each observation with respect to the covariance structure defined by the core observations.

ecd

A vector of Euclidean core distances of each observation.

core

The indices of [k*alpha] observations used to span the projection space and estimate the covariance matrix.

knn

The k nearest neighbours of the center observation.

center

The observation initiating the local description.

Author(s)

Thomas Ortner (thomas.ortner@tuwien.ac.at)

Examples

1
2
3
4
5
library(lop)
locDesc <- getLocalDescription(glass$data, center=1, k=20, alpha=0.5)
pch <- rep(1, nrow(glass$data))
pch[locDesc$core] <- 4
plot(locDesc$od ~ locDesc$cd, col=glass$group, pch=pch)

tortnertuwien/lop documentation built on May 30, 2019, 8:27 a.m.