Description Usage Arguments Value Examples
This function implements knn
to perform cross-validation.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
Input data frame. |
cl |
True class value of your training data. |
k_nn |
Integer representing the number of neighbors. |
k_cv |
Integer representing the number of folds. |
A list with objects:
class |
A vector of the predicted class for all observations. |
cv_err |
A numeric with the cross-validation misclassification error. |
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.