fitByDE {hydromad} | R Documentation |
Fit a hydromad model using the DE (Differential Evolution) algorithm.
fitByDE(MODEL, objective = hydromad.getOption("objective"), control = hydromad.getOption("de.control"))
MODEL |
a model specification created by |
objective |
objective function to maximise, given as a |
control |
settings for the DE algorithm. See |
the best model from those sampled, according to the given
objective
function. Also, these extra elements are inserted:
fit.result |
the result from |
objective |
the |
funevals |
total number of evaluations of the model simulation function. |
timing |
timing vector as returned by |
Felix Andrews felix@nfrac.org
library("DEoptim") data(Cotter) x <- Cotter[1:1000] ## IHACRES CWI model with power law unit hydrograph modx <- hydromad(x, sma = "cwi", routing = "powuh") modx foo <- fitByDE(modx, control = DEoptim.control(itermax = 5)) summary(foo) ## return value from DE: str(foo$fit.result) ## plot objective function value convergence over time xyplot(optimtrace(foo), type = "b", xlab = "function evaluations", ylab = "objective fn. value")