my_knn_cv: k-nearest neighbors cross validation

Description Usage Arguments Value Examples

View source: R/my_knn_cv.R

Description

This function applies k-nearest neighbors cross validation to given data frame, true class, n nearest neighbors, and n folds

Usage

1
my_knn_cv(train, cl, k_nn, k_cv)

Arguments

train

Dataframe containing the data used to predict

cl

Vector containing the true class

k_nn

Numeric indicating the number of neighbors

k_cv

Numeric indicating the number of folds

Value

List of predictions and cross validation error

Examples

1
2
3

kobesar/mypackage documentation built on Dec. 21, 2021, 7:40 a.m.