powered by
generates the code to create the k nearest neighbors model.
kkn_model( data = "datos.aprendizaje", variable.pred = NULL, scale = TRUE, kmax = 7, kernel = "optimal", model.var = "modelo.knn", distance = 2 )
the name of the learning data.
the name of the variable to be predicted.
the scale parameter of the model.
the kmax parameter of the model.
the kernel parameter of the model.
the name of the variable that stores the resulting model.
the distance parameter of the model.
train.kknn
# NOT RUN { library(kknn) x <- kkn_model('iris', 'Petal.Length') exe(x) print(modelo.knn) # }
Run the code above in your browser using DataLab