KNN

  train_kk <- train.kknn(group~.,
                          data=input,
                         kmax=100,
                          kernel = c("rectangular", "triangular",
                                     "epanechnikov", "gaussian",
                                     "rank", "optimal"))

  best_kernel <- train_kk$best.parameters$kernel
  best_k <- train_kk$best.parameters$k
  ce_kk <- train_kk$MISCLASS
  min_ce <- min(ce_kk)