Description Usage Arguments Value Examples
This function performs a k-Nearest Neighbors Cross-Validation in R
1 | my_knn_cv(train, cl, k_nn, k_cv)
|
train |
Input data frame to be validated |
cl |
true class value of the training data |
k_nn |
integer representing the number of neighbors |
k_cv |
integer representing the number of folds |
a list with objects output
.
1 2 | my_knn_cv(train = na.omit(STAT302package::my_penguins)[, 3:6]
, cl = na.omit(STAT302package::my_penguins)$species, k_nn = 5, k_cv = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.