Skip to content
Snippets Groups Projects
Commit 2adc3ddc authored by Mauricio Zambrano-Bigiarini's avatar Mauricio Zambrano-Bigiarini
Browse files

'params2ecdf.Rd' added documentation related to the new arguments

parent 997bb902
No related branches found
No related tags found
No related merge requests found
Package: hydroPSO
Type: Package
Title: Model-Independent Particle Swarm Optimisation for Environmental Models
Version: 0.1-58-24
Date: 2012-11-15
Version: 0.1-58-25
Date: 2012-11-19
Authors@R: c(person("Mauricio", "Zambrano-Bigiarini", email="mzb.devel@gmail.com", role=c("aut","cre")), person("Rodrigo", "Rojas", email="Rodrigo.RojasMujica@gmail.com", role=c("ctb")) )
Maintainer: Mauricio Zambrano-Bigiarini <mzb.devel@gmail.com>
Description: This package implements a state-of-the-art version of the Particle Swarm Optimisation (PSO) algorithm (SPSO-2011 and SPSO-2007 capable), with a special focus on the calibration of environmental models. hydroPSO is model-independent, allowing the user to easily interface any model code with the calibration engine (PSO). It includes a series of controlling options and PSO variants to fine-tune the performance of the calibration engine to different calibration problems. An advanced sensitivity analysis function together with user-friendly plotting summaries facilitate the interpretation and assessment of the calibration results. Bugs reports/comments/questions are very welcomed.
......
......@@ -32,15 +32,13 @@ params2ecdf <- function(params, ...) UseMethod("params2ecdf")
################################################################################
# Author : Mauricio Zambrano-Bigiarini #
# Started: 12-Oct-2011 #
# Updates: 15-Feb-2012 ; 21-Feb-2012 #
# Updates: 15-Feb-2012 ; 21-Feb-2012 ; 19-Nov-2012 #
################################################################################
params2ecdf.default <- function(params,
param.names=NULL,
gofs,
gofs=NULL,
MinMax=NULL,
beh.thr=NA,
weights=NULL,
byrow=FALSE,
plot=TRUE,
......@@ -80,7 +78,7 @@ params2ecdf.default <- function(params,
if ( !is.na(beh.thr) ) {
if ( is.null(MinMax) )
stop("Missing argument: 'MinMax' has to be provided before using 'beh.thr' !!")
if ( missing(gofs) ) {
if ( is.null(gofs) ) {
stop("Missing argument: 'gofs' has to be provided before using 'beh.thr' !!")
} else if (length(gofs) != n)
stop("Invalid argument: 'length(gofs) != nrow(params)' (", length(gofs), "!=", n, ") !!" )
......@@ -283,13 +281,16 @@ params2ecdf.default <- function(params,
} # END 'params2ecdf.default'
################################################################################ #
################################################################################
# Author : Mauricio Zambrano-Bigiarini #
# Started: 12-Oct-2011 #
# Updates: 12-Oct-2011 #
# Updates: 12-Oct-2011 ; 19-Nov-2012 #
################################################################################
params2ecdf.matrix <- function(params,
param.names=colnames(params),
gofs=NULL,
MinMax=NULL,
beh.thr=NA,
weights=NULL,
byrow=FALSE,
plot=TRUE,
......@@ -314,6 +315,9 @@ params2ecdf.matrix <- function(params,
) {
params2ecdf.default(params=params,
param.names=param.names,
gofs=gofs,
MinMax=MinMax,
beh.thr=beh.thr,
weights=weights,
byrow=byrow,
plot=plot,
......@@ -338,13 +342,16 @@ params2ecdf.matrix <- function(params,
)
} # END 'params2ecdf.data.frame'
################################################################################ #
################################################################################
# Author : Mauricio Zambrano-Bigiarini #
# Started: 12-Oct-2011 #
# Updates: 12-Oct-2011 #
# Updates: 12-Oct-2011 ; 19-Nov-2012 #
################################################################################
params2ecdf.data.frame <- function(params,
param.names=colnames(params),
gofs=NULL,
MinMax=NULL,
beh.thr=NA,
weights=NULL,
byrow=FALSE,
plot=TRUE,
......@@ -371,6 +378,9 @@ params2ecdf.data.frame <- function(params,
params2ecdf.default(params=params,
param.names=param.names,
gofs=gofs,
MinMax=MinMax,
beh.thr=beh.thr,
weights=weights,
byrow=byrow,
plot=plot,
......
......@@ -91,8 +91,8 @@ OPTIONAL. character, indicates if the optimum value in \code{params} corresponds
Valid values are in: \code{c('min', 'max')}
}
\item{beh.thr}{
numeric, used for selecting only the behavioural parameter sets, i.e., those with a goodness-of-fit value larger/lowervalue than \code{beh.th}, depending on the value of \code{MinMax}. \cr
It is only used for drawing a horizontal line used for separating behavioural from non behavioural parameter sets.
numeric, used for selecting only the behavioural parameter sets, i.e. those with a goodness-of-fit value greater/less than or equal to \code{beh.thr}, depending on the value of \code{MinMax}\cr
By default \code{beh.thr=NA} and all the parameter sets are considered for the subsequent anlysis
}
\item{beh.col}{
OPTIONAL. Only used when \code{plot=TRUE} \cr
......
......@@ -20,26 +20,26 @@ This function computes (weighted) empirical CDFs (ECDFs) for each calibrated par
\usage{
params2ecdf(params, ...)
\method{params2ecdf}{default}(params, param.names=NULL, weights=NULL,
byrow=FALSE, plot=TRUE, obs=NULL, main=NULL, nrows="auto",
ylab="Probability", col="blue", leg.cex=1.2, leg.pos="topleft",
cex.axis=1.2, cex.main=1.2, cex.lab=1.2, verbose=TRUE, ...,
do.png=FALSE, png.width=1500, png.height=900, png.res=90,
png.fname="Params_ECDFs.png")
\method{params2ecdf}{default}(params, param.names=NULL, gofs=NULL, MinMax=NULL,
beh.thr=NA, weights=NULL, byrow=FALSE, plot=TRUE, obs=NULL, main=NULL,
nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
\method{params2ecdf}{matrix}(params, param.names=colnames(params), weights,
byrow=FALSE, plot=TRUE, obs=NULL, main=NULL, nrows="auto",
ylab="Probability", col="blue", leg.cex=1.2, leg.pos="topleft",
cex.axis=1.2, cex.main=1.2, cex.lab=1.2, verbose=TRUE, ...,
do.png=FALSE, png.width=1500, png.height=900, png.res=90,
png.fname="Params_ECDFs.png")
\method{params2ecdf}{matrix}(params, param.names=colnames(params), gofs=NULL,
MinMax=NULL, beh.thr=NA, weights, byrow=FALSE, plot=TRUE, obs=NULL,
main=NULL, nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
\method{params2ecdf}{data.frame}(params, param.names=colnames(params), weights,
byrow=FALSE, plot=TRUE, obs=NULL, main=NULL, nrows="auto",
ylab="Probability", col="blue", leg.cex=1.2, leg.pos="topleft",
cex.axis=1.2, cex.main=1.2, cex.lab=1.2, verbose=TRUE, ...,
do.png=FALSE, png.width=1500, png.height=900, png.res=90,
png.fname="Params_ECDFs.png")
\method{params2ecdf}{data.frame}(params, param.names=colnames(params), gofs=NULL,
MinMax=NULL, beh.thr=NA, weights, byrow=FALSE, plot=TRUE, obs=NULL,
main=NULL, nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
}
%- maybe also 'usage' for other objects documented here.
\arguments{
......@@ -48,6 +48,17 @@ matrix or data.frame with the parameter values, where each row represent a diffe
}
\item{param.names}{
character vector, names to be used for each parameter in \code{params} (by default its column names)
}
\item{gofs}{
OPTIONAL. numeric with the values of goodness-of-fit values for each parameter in \code{params} (in the same order!)
}
\item{MinMax}{
OPTIONAL. character, indicates if the optimum value in \code{params} corresponds to the minimum or maximum of the the objective function. Only used to identify the optimum in the plot \cr
Valid values are in: \code{c('min', 'max')}
}
\item{beh.thr}{
numeric, used for selecting only the behavioural parameter sets, i.e. those with a goodness-of-fit value (as given in \code{gofs}) greater/less than or equal to \code{beh.thr}, depending on the value of \code{MinMax}\cr
By default \code{beh.thr=NA} and all the parameter sets are considered for the subsequent anlysis
}
\item{weights}{
numeric vector, values of the weights to be used for computing the empirical CDFs \cr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment