I_optim | R Documentation |
optimx speed is not satisfied. So I_optim
is present.
I_optim
: Interface of unified optimization functions.
I_optimx
: deprecated, which is about 10 times slower than I_optim
.
I_optim(prior, FUN, y, t, method = "BFGS", ..., use.cpp = FALSE)
I_optimx(prior, FUN, y, t, method, verbose = FALSE, ..., use.cpp = FALSE)
prior |
A vector of initial values for the parameters for which optimal
values are to be found. |
FUN |
Fine curve fitting function for goal function |
y |
Numeric vector, vegetation index time-series |
t |
Numeric vector, |
method |
|
... |
other parameters passed to |
use.cpp |
(unstable, not used) boolean, whether to use c++ defined fine
fitting function? If |
verbose |
If |
convcode
: An integer code. 0 indicates successful convergence.
Various methods may or may not return sufficient information to allow all
the codes to be specified. An incomplete list of codes includes
1
: indicates that the iteration limit maxit
had been reached.
20
: indicates that the initial set of parameters is inadmissible,
that is, that the function cannot be computed or returns an infinite,
NULL, or NA value.
21
: indicates that an intermediate set of parameters is inadmissible.
10
: indicates degeneracy of the Nelder–Mead simplex.
51
: indicates a warning from the "L-BFGS-B"
method; see component
message
for further details.
52
: indicates an error from the "L-BFGS-B"
method; see component
message
for further details.
9999
: error
value
: The value of fn corresponding to par
par
: The best parameter found
nitns
: the number of iterations
fevals
: The number of calls to objective
.
stats::optim()
, stats::nlminb()
,
stats::nlm()
, optimx::optimx()
,
ucminf::ucminf()
# simulate vegetation time-series
FUN = doubleLog_Beck
par = c( mn = 0.1 , mx = 0.7 , sos = 50 , rsp = 0.1 , eos = 250, rau = 0.1)
par0 = c( mn = 0.15, mx = 0.65, sos = 100, rsp = 0.12, eos = 200, rau = 0.12)
t <- seq(1, 365, 8)
y <- FUN(par, t)
methods = c("BFGS", "ucminf", "nlm", "nlminb")
opt1 <- I_optim (par0, FUN, y, t, methods)
opt2 <- I_optimx(par0, FUN, y, t, methods)
# \dontrun{
# microbenchmark::microbenchmark(
# opt1 = I_optim (par0, FUN, y, t, methods),
# opt2 = I_optimx(par0, FUN, y, t, methods),
# times = 2
# )
# }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.