k_fold: K-fold

View source: R/cv.R

k_foldR Documentation

K-fold

Description

A K-fold setting for crossvalidation

Usage

k_fold(
  data,
  dependent_variable = "y",
  k_partitions,
  seed = NULL,
  as_data_frame = FALSE
)

Arguments

data

A data.frame with the whole data to be split into training and test folds.

dependent_variable

A string with the name of the target variable

k_partitions

Number of folds to be used in the K-Fold setting

seed

Setting a seed to reproducibility of the cross validation

as_data_frame

A Boolean to return the x_train and x_test partitions as data.frame


MateusMaiaDS/gpbart documentation built on Jan. 26, 2024, 7:07 a.m.