Description Usage Arguments Value Examples
This function predicts output from existing variables by using k-nearest neighbors cross-validation
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
The input data frame. |
cl |
The true class value of training data. |
k_nn |
The integer representing the number of neighbors. |
k_cv |
The integer representing the number of folds. |
List with objects:
a vector of the predicted class Y hat for all observations
a numeric with the cross-validation misclassification error
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.