my_knn_cv: K Nearest Neighbours

Description Usage Arguments Value Examples

View source: R/my_knn_cv.R

Description

Predicts output class species using covariates bill_length_mm, bill_depth_mm, flipper_length_mm, and body_mass_g.

Usage

1
my_knn_cv(train, cl, k_nn, k_cv)

Arguments

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

Value

list containing a vector of the predicted class for all observations, and a numberic with the cross-validation and misclassification error

Examples

1
2

jacklorrengriffin/myfirstpackage documentation built on Dec. 20, 2021, 8:05 p.m.