verification: verification

Description Usage Arguments Details Value Author(s) See Also

View source: R/verification.R

Description

Run the model and get a goodness-of-fit value by comparing the simulated values against observations for the optimum parameter set found by optimisation

Usage

1
2
verification(fn="hydromod", par, ..., control=list(), 
             model.FUN=NULL, model.FUN.args=list() )

Arguments

fn

character, name of a valid R function to be optimised or character value 'hydromod'. When fn='hydromod' the algorithm uses model.FUN and model.FUN.args to extract the values simulated by the model and to compute its corresponding goodness-of-fit function. When fn!='hydromod' the algorithm uses the value(s) returned by fn as both model output and its corresponding goodness-of-fit
When fn='hydromod' the algorithm will optimise the model defined by model.FUN and model.args

...

OPTIONAL. Only used when fn!='hydromod' & fn!='hydromodInR'.
further arguments to be passed to fn.

par

numeric, or matrix/data.frame with the parameter sets that will be used for verification
Parameter sets in par must be stored by row, i.e., each different row represents a different parameter set

control

a list of control parameters. See ‘Details’

model.FUN

OPTIONAL. Only used when fn='hydromod'
character, valid R function representing the model code to be calibrated/optimised

model.FUN.args

OPTIONAL. Only used when fn='hydromod'
list with the arguments to be passed to model.FUN

Details

The control argument is a list that can supply any of the following components:

drty.in

character, path to the directory storing the input files required for PSO, i.e. ‘ParamRanges.txt’ and ‘ParamFiles.txt’

drty.out

character, path to the directory storing the output files generated by hydroPSO

digits

OPTIONAL. Only used when write2disk=TRUE
numeric, number of significant digits used for writing the outputs in scientific notation

gof.name

character, ONLY used for identifying the goodness-of-fit of each model run and writing it to the LH_OAT-gof.txt output file

MinMax

character, indicates whether the optimum value for the analysed problem corresponds to the minimum or maximum of the the objective function. It is used to select the ‘best’ parameter set. Valid values are in: c('min', 'max')

do.plots

logical, if TRUE a PNG plot with the comparison between observed and simulated values is produced for each parameter set used in the LH-OAT

write2disk

logical, indicates if the output files will be written to the disk

verbose

logical, if TRUE progress messages are printed

Value

A list of two elements:

gofs

numeric with the goodness-of-fit values corresponding to each one of the parameter sets provided in par

model.values

data.frame with the model outputs corresponding to each one of the parameter sets provided in par

best.param

numeric with the parameter values of the "best" paraemter set found during the verification period

best.gof

numeric with the goodness-of-fit of the "best" parameter set found during the verification period

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail.com

See Also

hydromod


hydroPSO documentation built on April 29, 2020, 9:37 a.m.