General purpose model fit function, called by higher order pr_fit_comaprison() and pr_cross_validate() functions. In itself a wrapper around the pr_fit_parameter() function.

pr_fit(
  model = "TT",
  data = phenor::phenocam_DB,
  method = "GenSA",
  control = list(max.call = 2000),
  par_ranges = system.file("extdata", "parameter_ranges.csv", package = "phenor",
    mustWork = TRUE),
  plot = TRUE,
  ...
)

Arguments

model

the model name to be used in optimizing the model

data

dataset generated by the format_phenocam() or format_modis() routines, or adhering to the general model optimization input format.

method

optimization method to use (default = GenSA) - GenSA : Generalized Simulated Annealing algorithm - genoud : GENetic Optimization Using Derivatives - BayesianTools: various bayesian based optimization tools

control

list of control parameters to be passed to the optimizer

par_ranges

a vector of starting parameter values (function specific) defaults to the parameter ranges as provided with the current models and set forth by Basler (2016)

plot

TRUE / FALSE, plot model fit

...

additional control parameters to be passed

Details

This function together with pr_predict() is in many ways the core of the package.

Examples


if (FALSE) {
pr_fit(model,
       par_ranges = "parameter_ranges.csv")
}