Description Usage Arguments Value Examples
This function predicts the class of the input using k-Nearest Neighbors and find the cross-validation error.
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
Data Frame input containing the training data. |
cl |
Vector input containing the class of the training data. |
k_nn |
Numeric input indicating the number nearest neighbors. |
k_cv |
Numeric input indication the number of folds in the cross validation. |
List containing a vector of the predicted class for the train
and a numeric indicating the cross-validation misclassification error.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.