Skip to contents

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

Usage

StatisticSettings_MakeModel_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 StatisticSettings_MakeModel_knn object.

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/.