kkn_prediction

0th

Percentile

kkn_prediction

generates the code to create the prediction of the k nearest neighbors model.

Usage
kkn_prediction(data = "datos.prueba", variable.pred = NULL,
  model.var = "modelo.knn", pred.var = "prediccion.knn")
Arguments
data

the name of the test data.

variable.pred

the name of the variable to be predicted.

model.var

the name of the variable that stores the resulting model.

pred.var

the name of the variable that stores the resulting prediction.

Aliases
  • kkn_prediction
Examples
# NOT RUN {
library(kknn)
library(dplyr)

x <- kkn_model('iris', 'Petal.Length', model.var = 'model_knn')
exe(x)
print(model_knn)

x <- kkn_prediction('iris', 'Petal.Length', 'model_knn', 'my_prediction')
exe(x)
print(my_prediction)

# }
Documentation reproduced from package regressoR, version 1.1.7, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.