I_optim: Interface of unified optimization functions.

Description Usage Arguments Value See Also Examples

View source: R/I_optim.R

Description

optimx speed is not satisfied. So I_optim is present.

Usage

1
2
3
I_optim(prior, FUN, y, t, method = "BFGS", fn = f_goal, ..., use.julia = FALSE)

I_optimx(prior, FUN, y, t, method, verbose = FALSE, ...)

Arguments

prior

A vector of initial values for the parameters for which optimal values are to be found. prior is suggested giving a column name.

FUN

Fine curve fitting function for goal function f_goal().

y

Numeric vector, vegetation index time-series

t

Numeric vector, Date variable

method

method can be some of 'BFGS','CG','Nelder-Mead', 'L-BFGS-B', 'nlm', 'nlminb', 'ucminf'.
For I_optimx, other methods are also supported, e.g. 'spg','Rcgmin','Rvmmin', 'newuoa','bobyqa','nmkb','hjkb'.

...

other parameters passed to I_optim() or I_optimx().

use.julia

whether use julia nlminb optimization?

verbose

If TRUE, all optimization methods in optimx::optimx() are used, and print optimization information of all methods.

Value

See Also

stats::optim(), stats::nlminb(), stats::nlm(), optimx::optimx(), ucminf::ucminf()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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
# )
# }

phenofit documentation built on April 2, 2020, 5:07 p.m.