Description Usage Arguments Value Examples
This function performs a knn cross-validation.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
Data frame input used as the training data. |
cl |
List of true class values of the training data. |
k_nn |
Numeric input used as the number of neighbors. |
k_cv |
Numeric input used as the number of folds. |
a list composed of class and cv_err. class is a vector of predicted class of all observations. cv_err is the cross-validation misclassification error.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.