R/latrend.R
createTrainDataFolds.Rd
Create the training data for each of the k models in k-fold cross validation evaluation
createTrainDataFolds(
data,
folds = 10L,
id = getOption("latrend.id"),
seed = NULL
)
A list
of data.frame
of the folds
training datasets.
Other validation methods:
createTestDataFold()
,
createTestDataFolds()
,
latrendBoot()
,
latrendCV()
,
lcModel-data-filters
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
if (require("caret")) {
trainFolds <- createTrainDataFolds(latrendData, folds = 5, id = "Id", seed = 1)
foldModels <- latrendBatch(method, data = trainFolds)
testDataFolds <- createTestDataFolds(latrendData, trainFolds)
}