Create the training data for each of the k models in k-fold cross validation evaluation
createTrainDataFolds(
data,
folds = 10,
id = getOption("latrend.id"),
seed = NULL
)
A data.frame
representing the complete dataset.
The number of folds. By default, a 10-fold scheme is used.
The trajectory identifier variable.
The seed to use, in order to ensure reproducible fold generation at a later moment.
A list
of data.frame
of the folds
training datasets.
Other validation methods:
createTestDataFolds()
,
createTestDataFold()
,
latrendBoot()
,
latrendCV()
,
lcModel-data-filters
# NOT RUN {
data(latrendData)
trainFolds <- createTrainDataFolds(latrendData, folds = 10, id = "Id")
trainFolds <- createTrainDataFolds(latrendData, folds = 10, id = "Id", seed = 1)
# }
Run the code above in your browser using DataLab