KNNHyperparameters
Variantk-Nearest Neighbors (kknn). See `setup_KNN`.
Properties
kinteger | object≥ 1Number of neighbors. Must be less than the number of training cases.
kernelstring | objectKernel used to weight neighbors by distance; "rectangular" gives unweighted KNN.
one of
"rectangular""triangular""epanechnikov""biweight""triweight""cos""inv""gaussian""rank""optimal"distancenumber | object> 0Parameter of the Minkowski distance: 1 is Manhattan, 2 is Euclidean.
scalebooleanScale features to unit variance before computing distances.
ifwboolean | objectInverse Frequency Weighting in classification.
Relationships
Used by