Description Usage Arguments Value Examples
This function predicts the class value by k-fold Cross-validation and k-nearest neighbors algorithms.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
Dataframe of training data |
cl |
Vector input of true class value of the training data |
k_nn |
Numeric number of neighbors used in k-nearest neighbors |
k_cv |
Numeric number of folds used in k-fold cross-validation |
List object containing the predicted class value of the data, the CV misclassification rate and the training misclassification rate
1 | my_knn_cv(my_gapminder[, 4:5], my_gapminder$continent, 1, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.