Usage
read_results(drty.out="PSO.out", MinMax=NULL, beh.thr=NA,
modelout.cols=NULL, nsim=NULL, verbose=TRUE)
plot_results(drty.out="PSO.out", param.names, gof.name="GoF", MinMax=NULL,
beh.thr=NA, beh.col="red", beh.lty=1, beh.lwd=2, nrows="auto",
col="black", ylab=gof.name, main=NULL, pch=19, cex=0.5, cex.main=1.7,
cex.axis=1.3, cex.lab=1.5, breaks="Scott", freq=TRUE, do.pairs=FALSE,
weights=NULL, byrow=FALSE, leg.cex=1.2, dp3D.names="auto", GOFcuts="auto",
colorRamp= colorRampPalette(c("darkred", "red", "orange", "yellow",
"green", "darkgreen", "cyan")), alpha=0.65, points.cex=0.7, ptype="one", nsim=NULL, modelout.cols=NULL,
ftype="o", FUN=mean,
quantiles.desired= c(0.05,0.5,0.95),
quantiles.labels= c("Q5","Q50","Q95"), legend.pos="topright", do.png=FALSE, png.width=1500, png.height=900, png.res=90,
dotty.png.fname="Params_DottyPlots.png",
hist.png.fname ="Params_Histograms.png",
bxp.png.fname="Params_Boxplots.png",
ecdf.png.fname ="Params_ECDFs.png",
pruns.png.fname="Params_ValuesPerRun.png",
dp3d.png.fname ="Params_dp3d.png",
pairs.png.fname="Params_Pairs.png",
part.png.fname ="Particles_GofPerIter.png",
vruns.png.fname="Velocities_ValuePerRun.png",
modelout.best.png.fname="ModelOut_BestSim_vs_Obs.png",
modelout.quant.png.fname="ModelOut_Quantiles.png",
conv.png.fname ="ConvergenceMeasures.png", verbose=TRUE)
Arguments
drty.out
character, path to the directory storing the output files generated by hydroPSO
param.names
character, names for the parameters in params
that have to be plotted (param.names
can be a subset of params
).
Names for each parameter are taken from the first row of the Particles.txt file
verbose
logical, if TRUE, progress messages are printed
gof.name
character, name of the goodness-of-fit variable in all plots
MinMax
OPTIONAL. character, indicates whether the optimum value in x
corresponds to the minimum or maximum of the objective function. It is only used to identify the optimum on the plots
Valid values are in: c('min', 'max')
beh.thr
OPTIONAL. numeric, threshold to filter out parameter sets and model outputs with a non-acceptable performance (non behavioural parameter sets)
nsim
OPTIONAL. number simulated equivalent values of the model / objective function to be compared against observations.
It is only useful when the model to be calibrated returns NA
instead of the simulated values for some parameter set(s) (e.g.,
modelout.cols
numeric, column number in file
that store the outputs that have to be read/plotted, without counting the first three that correspond to iteration, particle and GoF. If modelout.cols=NULL
, all the columns in will be read
beh.col
OPTIONAL. Only used when plot=TRUE
character, colour for drawing a horizontal line for separating behavioural from non behavioural parameter sets
beh.lty
OPTIONAL. Only used when plot=TRUE
numeric, line type for drawing a horizontal line for separating behavioural from non behavioural parameter sets
beh.lwd
OPTIONAL. Only used when plot=TRUE
numeric, width for drawing a horizontal line for separating behavioural from non behavioural parameter sets
nrows
OPTIONAL. Only used when plot=TRUE
numeric, number of rows to be used in the plotting window
If nrows
is set to auto, the number of rows is automatically computed depending on the number of columns of x
col
OPTIONAL. Only used when plot=TRUE
character, colour to be used for drawing the points of the dotty plots
ylab
OPTIONAL. Only used when plot=TRUE
character, label for the 'y' axis
main
OPTIONAL. Only used when plot=TRUE
character, title for the plot
pch
OPTIONAL. Only used when plot=TRUE
numeric, type of symbol to be used for drawing the points of the dotty plots. (e.g., 1: white circle)
cex
OPTIONAL. Only used when plot=TRUE
numeric, values controlling the size of text and points with respect to the default
cex.main
OPTIONAL. Only used when plot=TRUE
numeric, magnification for main titles relative to the current setting of cex
cex.axis
OPTIONAL. Only used when plot=TRUE
numeric, magnification for axis annotation relative to the current setting of cex
cex.lab
OPTIONAL. Only used when plot=TRUE
numeric, magnification for x and y labels relative to the current setting of cex
breaks
OPTIONAL. Only used when plot=TRUE
breaks for plotting the histograms of the parameter sets. See hist
freq
OPTIONAL. Only used when plot=TRUE
logical, if TRUE, the histogram graphic is a representation of frequencies, the counts component of the result; if FALSE, probability densities, component density, are plotted (so that the histogram has a t
do.pairs
OPTIONAL. Only used when plot=TRUE
logical, indicates whether a correlation matrix among parameters has to be plotted. If the number of parameter sets tried during the optimisation is large, it may require some time.
weights
OPTIONAL. Only used when plot=TRUE
numeric vector, values of the weights to be used for computing the empirical CDFs. See params2ecdf
byrow
OPTIONAL. Only used when plot=TRUE
logical, indicates whether the computations have to be made for each column or for each row of x
. See params2ecdf
leg.cex
OPTIONAL. Only used when plot=TRUE
character expansion factor *relative* to current 'par("cex")'. Used for text, and provides the default for 'pt.cex' and 'title.cex'. Default value = 1.2
dp3D.names
character, name for all the parameters (usually only the most sensitive ones) that will be used for plotting pseudo-3D dotty plots
If dp3D.names='auto'
half the number of parameters in file
are chosen randomly for plotting. See
GOFcuts
numeric, specifies at which values of the objective function gof.name
the colours of the plot have to change. See plot_NparOF
colorRamp
R function defining the colour ramp to be used for colouring the pseudo-3D dotty plots of Parameter Values, OR character representing those colours. See plot_NparOF
alpha
numeric between 0 and 1 representing the transparency level to apply to the colors of the pseudo-3D dotty plots. See plot_NparOF
points.cex
size of the points to be plotted
ptype
character, represents the type of plot. Valid values are: in c("one", "many"), for plotting all the particles in the same figure or in one windows per particle, respectively
See plot_GofPerParticle
ftype
OPTIONAL. Only used when plot=TRUE
and the observed values provided by the user were zoo objects. See plot_out
and ggof
. FUN
OPTIONAL. Only used when plot=TRUE
and the observed values provided by the user were zoo objects. See plot_out
and ggof
quantiles.desired
numeric vector, quantiles to be computed. Default values are c(.025, .5, .975) ( => 2.5%, 50%, 97.5% ). See plot_out
quantiles.labels
OPTIONAL. Only used when plot=TRUE
character vector, names to quantiles.desired
. Default value is c("Q5", "Q50", "Q95"). See plot_out
do.png
logical, indicates if all the figures have to be saved into PNG files instead of the screen device
png.width
OPTIONAL. Only used when do.png=TRUE
numeric, width of the PNG device. See png
png.height
OPTIONAL. Only used when do.png=TRUE
numeric, height of the PNG device. See png
png.res
OPTIONAL. Only used when do.png=TRUE
numeric, nominal resolution in ppi which will be recorded in the PNG file, if a positive integer of the device. See png
dotty.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the dotty plots of the parameter values.
hist.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the histograms of the parameter values.
bxp.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the boxplots of the parameter values
ecdf.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the empirical CDFs of the parameter values.
pruns.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the parameter values vs the number of model evaluations
dp3d.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the pseudo-3D plots of all the parameters defined in dp3D.names
pairs.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the correlation matrix among the parameters and goodness-of-fits measures in params
and gofs
. See
part.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the goodness-of-fit for all the particles along the iterations
vruns.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the velocity values vs the number of model evaluations
modelout.best.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the observed values against its best simulated counterpart. See plot_out
modelout.quant.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with some quantiles of simulated values against its observed counterparts. See plot_out
conv.png.fname
OPTIONAL. Only used when do.png=TRUE
character, filename used to store the PNG file with the convergence measures. See plot_convergence