my_knn_cv: K-nearest Neighbors Cross Validation Function

Description Usage Arguments Value Examples

View source: R/my_knn_cv.R

Description

This function predicts output using covaritates.

Usage

1
my_knn_cv(train, cl, k_nn, k_cv)

Arguments

train

A data frame to input.

cl

It is a true value of my training data.

k_nn

An integer that represents the number of neighbors.

k_cv

An integer that represents the number of folds.

Value

The function will output a list of objects.

Examples

1
2
my_knn_cv(train = iris[, -5], cl = iris$Species, 1, 5)
my_knn_cv(train = iris[, -5], cl = iris$Species, 5, 5)

carldmyers/PROJECT3 documentation built on March 25, 2020, 12:11 a.m.