These functions can be used to transform a vector of data or parameters between unconstrained [-Inf, Inf] and box-constrained representation (interval [lower, upper]).
vector of data (e.g. model parameters),
vectors with lower resp. upper bounds used for transformation,
optional scaling factor.
These functions are employed by
ssqOdeModel in order to be able to use the unconstrained
optim for constrained optimization.
The transformation functions are
p' = tan(pi/2 * (2 * p - upper - lower) / (upper - lower)) / f
and its inverse
p = 1/2 * (upper + lower) + (upper - lower) * arctan(f * p')/pi
vector with transformed (resp. back-transformed) values.
This trick seems to be quite common, but in most cases it is preferred to apply optimizers that can handle constraints internally.
Reichert, T. (1998) AQUASIM 2.0 User Manual. Computer Program for the Identification and Simulation of Aquatic Systems. Swiss Federal Institute for Environmental Science and Technology (EAWAG), CH - 8600 Duebendorf Switzerland, http://www.aquasim.eawag.ch/e_aquasim_manual.html
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.