powered by
Applies k-Fold cross validation to the given model on the given data
k_fold_cv( data = NULL, model = NULL, random_state = NULL, k = 5, y_index = ncol(data) )
A vector consists of metric of the individual folds and the average metric over the folds
The dataset to be used
A classification or a regression model (from LESS package)
A seed number to get reproducable result
Number of splits on the training set (defaults to 5)
Column index of the response variable on the given data. Default is the last column.
k_fold_cv(data = iris, model = KNeighborsClassifier$new(), k = 3)
Run the code above in your browser using DataLab