kf_xval: k-fold cross validation

Description Usage Arguments

View source: R/EvalFramework.R

Description

kf_xval applies a k-fold cross-validation methodology to a given data set.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
kf_xval(
  x,
  form,
  nfolds,
  FUN,
  shuffle.rows = TRUE,
  average_results = FALSE,
  seedlock = FALSE,
  percTest = NULL,
  ...
)

Arguments

x

data: embedded time series

form

A model formula

nfolds

no of folds

FUN

function to apply to each iteration's train and validation. Typically FUN is a workflow where a predictive model is applied in a training set and the model is evaluated in the validation set.

shuffle.rows

Boolean for shuffling rows in cross-validation methodology. Default TRUE

average_results

Boolean for return average results of metrics. Default FALSE

seedlock

Random seed. Defaults to FALSE (appointing the seed 123)

percTest

Percentage for holdout evaluation (generalisation). Default is NULL

...

further parameters to FUN


nunompmoniz/autoresampling documentation built on April 26, 2021, 4:43 a.m.