regressoR (version 2.0.1)

kkn_model: kkn_model

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.

See Also

train.kknn