Pseudo-random search algorithm of Price (1997). Used in the book as an example of
a random-based fitting technique, and as an example of how to create a function in R.
function to be minimised, its first argument should bw the vector of parameters
over which minimization is to take place. It should return a scalar result, the model cost, e.g the sum of squared residuals.
npop
number of elements in population
numiter
number of iterations to be performed. Defaults to 10000. There is no other stopping criterion.
centroid
number of elements from which to estimate new parameter vector
varleft
relative variation remaining; if below this value algorithm stops
...
arguments passed to funtion func
Details
see the book of Soetaert and Herman for a description of the algorithm AND for a line to line explanation of the function code.
Value
a list containing:
par
the optimised parameter values
cost
the model cost, or function evaluation associated to the optimised parameter values, i.e. the minimal cost
poppar
all parameter vectors remaining in the population, matrix of dimension (npop,length(par))
popcost
model costs associated with all population parameter vectors, vector of length npop
Author(s)
Karline Soetaert <karline.soetaert@nioz.nl>
References
Soetaert, K. and P.M.J. Herman, 2009.
A Practical Guide to Ecological Modelling. Using R as a Simulation Platform.
Springer, 372 pp.
Price, W.L., 1977. A controlled random search procedure for global optimisation.
The Computer Journal, 20: 367-370.