my_knn_cv: k-nearest Neighbors Cross Validation.

Description Usage Arguments Value Examples

View source: R/my_knn_cv.R

Description

k-nearest Neighbors Cross Validation.

Usage

1
my_knn_cv(train, cl, k_nn, k_cv)

Arguments

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.

Value

a list of two objects: class; a vector of predicted classes for each observation, and cv_err; the numeric misclassification error.

Examples

1
2

ElliotWinters/exwProject3 documentation built on Dec. 17, 2021, 6:26 p.m.