Description Usage Arguments Value Author(s) Examples
View source: R/k_fold_cross_validation.R
k-Fold Cross Validation for knn Classifier algorithm
1 2 3 | k_fold_cross_validation(data, target, method = c("k_fold",
"multi_k_fold"), algorithm = "knn", k_fold = 10, times = 5,
metric = "Accuracy", ...)
|
data |
Dataframe that will be used |
target |
Integer with the column number of the target variable |
method |
Could be "k_fold" or "multi_k_fold" |
algorithm |
Only "knn" available |
k_fold |
Number of folds that will be created |
times |
Number of times to create "multi_k_fold" |
metric |
Metric that will be evaluated. Possible values: "Accuracy", "Sensitivity" or "Specificity" |
Returns the mean values for the metric selected
Alberto Almui?a
1 | data<-k_fold_cross_validation(data = iris, target = 5, method = "k_fold", k_fold = 3, metric = "Sensitivity")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.