View source: R/cost_functions.r
likelihood | R Documentation |
The function is aimed to be maximized, to use it with optimizers which minimize cost functions wrap the function as such: 'cost = function(...){abs(likelihood(...))}'
likelihood(par, data, model, ...)
par |
a vector of parameter values, this is functions specific |
data |
nested data structure with validation data as returned by format_phenocam() or format_pep725(), or your own dataset adhering to the same data structure. |
model |
the model name to be used in optimizing the model |
... |
extra arguments to pass to the function |
the RMSE comparing observed and estimated values
# The cost function returns the rmse between the
# true values and those generated by the model given a
# parameterset par.
## Not run:
cost_value = likelihood(par, data, model="TTs")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.