Description Usage Arguments Value Examples
This function uses k-nearest neighbors cross validation to predict the output class.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
data frame input. |
cl |
true class value of the training data. |
k_nn |
numeric input of the number of neighbors. |
k_cv |
numeric input of the number of folds. |
A list with the predicted class, and a numeric output of the cross validation error.
1 2 | my_knn_cv(train = my_gapminder[, c(4, 6)], cl = my_gapminder$continent, k_nn = 5,
k_cv = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.