Skip to contents

Prepares a classification model using the k-nearest neighbors (knn) algorithm from package class.

Usage

StatisticSettings_PrepareClassification_knn(k = 3, l = 0)

Arguments

k

Integer (length 1) with the number of neighbors to be used.

l

Integer (length 1) with the minimum vote for definite decision, otherwise doubt. (More precisely, less than k-l dissenting votes are allowed, even if k is increased by ties.)

Value

A ProcessingSettings S3 class object with subclass StatisticSettings_PrepareClassification_knn.

References

Venables WN, Ripley BD (2002). Modern Applied Statistics with S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, https://www.stats.ox.ac.uk/pub/MASS4/.