Description Usage Arguments Value Examples
k-nearest Neighbors Cross Validation.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
an input data frame, |
cl |
the true class value of the training data |
k_nn |
an integer of the number of neighbors |
k_cv |
an integer of the number of folds. |
a list of two objects: class
; a vector of predicted classes
for each observation, and cv_err
; the numeric misclassification
error.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.