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