DMwR (version 0.4.1)

dist.to.knn: An auxiliary function of lofactor()

Description

This function returns an object in which columns contain the indices of the first k neighbors followed by the distances to each of these neighbors.

Usage

dist.to.knn(dataset, neighbors)

Arguments

dataset
A data set that will be internally coerced into a matrix.
neighbors
The number of neighbours.

Value

A matrix

Details

This function is strongly based on the code provided by Acuna et. al. (2009) for the previously available dprep package.

References

Acuna, E., and Members of the CASTLE group at UPR-Mayaguez, (2009). dprep: Data preprocessing and visualization functions for classification. R package version 2.1.

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

lofactor