Description Usage Arguments Value Examples
This function predict output class species
using covariates
bill_length_mm
, bill_depth_mm
, flipper_length_mm
, and body_mass_g
.
1 | my_knn_cv(k_cv, train, cl, k_nn)
|
k_cv |
Integer representing the number of folds. |
train |
Input data frame. |
cl |
True class value of your training data. |
k_nn |
Integer representing the number of neighbors. |
a list with objects: class of speciese and CV error
1 2 | train <- na.omit(my_penguins)
my_knn_cv(5, train[,3:6],train[[1]], 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.