knnDS: K-Nearest Neighbour Classification

View source: R/knnDS.R

knnDSR Documentation

K-Nearest Neighbour Classification

Description

Compute K-Nearest Neighbours of a query vector

Usage

knnDS(x, neigh, classificator_name, method.indicator, k, noise, ...)

Arguments

x

data frame Dataset to get the neighbours and tags

neigh

numeric number of neighbours considered

classificator_name

character Name of column on the table 'x' that has the classifier factor

method.indicator

character (default "knn") specifies the method that is used to generated non-disclosive coordinates to calculate the euclidean distance. This argument can be set as 'knn' or 'noise'

k

numeric (default 3) he number of the nearest neighbors for which their centroid is calculated

noise

numeric (default 0.25) the percentage of the initial variance that is used as the variance of the embedded noise if the argument method is set to 'noise'

...

numeric Queried vector

Value

list with:
-distance numeric: Distances of the queried vector to the anonimized dataset
-classification character: Clasification tag of the queried vector


isglobal-brge/dsML documentation built on March 14, 2023, 1:58 p.m.