generates a k nearest neighbors model.
kkn_model(
data,
variable.pred,
scale = TRUE,
k = 7,
kernel = "optimal",
distance = 2
)
dataframe
the name of the variable to be predicted.
the scale parameter of the model.
the k value of the model.
string. The kernel parameter of the model.
the distance parameter of the model.
train.kknn