Faciliates model cross-validation using k-fold or leave-one-out cross validation.
pr_cross_validate(
k = 10,
cv_seed = 1234,
cv_set = NULL,
ncores = 1,
random_seeds = c(1, 12, 40),
models = c("LIN", "TT", "TTs", "PTT", "PTTs", "M1", "M1s", "AT", "SQ", "SQb", "SM1",
"SM1b", "PA", "PAb", "PM1", "PM1b", "UN", "UM1", "SGSI", "AGSI"),
data = phenor::phenocam_DB,
method = "GenSA",
control = list(max.call = 5000, temperature = 10000),
par_ranges = sprintf("%s/extdata/parameter_ranges.csv", path.package("phenor"))
)
perform k-fold cross validation (set k=0 to perform a leave-one-out cross-validation)
a vector with random seeds for cross validation (to shuffle the input data)
(optional) use custom sets cross validation (requires a list of vectors the indices of the data used for validation (hold-out), the remaining data will be used for calibration)
number of cores to use for crossvalidation (requires 'doParallel' and 'foreach' library)
a vector with random seeds for optimization replicates
list of models to compare
which standard or custom dataset to use
which optimization method to use, GenSA or rgenoud (default = GenSA)
additional optimization control parameters (default = list(max.call = 5000, temperature = 10000))
location of the parameter ranges of the models