k_knn_tester: k_knn_tester

Description Usage Arguments Value Author(s) Examples

View source: R/k_knn_tester.R

Description

Search the best 'k' parameter

Usage

1
2
3
k_knn_tester(data, target = is.integer(), k = is.vector(),
  method = c("bootstrap", "cross_validation"), metric = c("Accuracy",
  "Sensitivity", "Specificity"), ...)

Arguments

data

Dataframe that will be used

target

Integer with the column number of the target variable

k

vector of values to use

method

"bootstrap" or "cross_validation"

metric

Metric that will be evaluated. Possible values: "Accuracy", "Sensitivity" or "Specificity"

Value

Returns the mean values for the metric selected for each 'k' value and plots

Author(s)

Alberto Almui?a

Examples

1
data<-k_knn_tester(data = iris, target = 5, k = c(3,5,7,9), method = "bootstrap", metric = "Sensitivity")

AlbertoAlmuinha/knnClassifier documentation built on Oct. 30, 2019, 4:48 a.m.