Description Usage Arguments Value Examples
This function performs a k-nearest neighbors cross-validation on the given data.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
An input data frame. |
cl |
A true class value of |
k_nn |
An integer representing the number of neighbors. |
k_cv |
An integer representing the number of folds. |
A list containing a vector set of the predicted class for all the observatoin and a number representing the cross-validation misclassification error.
1 | my_knn_cv(my_gapminder, my_gapminder$continent, 1, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.