parabolic_em | R Documentation |
Using parabolic-EM method Berlinet (2009) to accelerate general fixed-point iteration problems.
parabolic_em(par, fixptfn, objfn, ..., control = list())
par |
Vector for initial parameters |
fixptfn |
Fixed point updating function |
objfn |
Objective function |
... |
Other arguments required by |
control |
A list containing parameters controlling the algorithm |
The task it to minimize objfn
. Default values of control
are: warmup=5, h=0.1, a=1.5, maxtry=Inf, version="geometric", objfn.inc=0, projection=function(x) x, tol=1e-7, maxiter=2000, convtype="parameter", par.track=FALSE, conv.spec=NULL
.
An integer variable indicating the number of fixptfn
to be evaluated before starting this algorithm. Default is 5.
A positive real number in the line search of geometric method. Default is 1.5.
A positive real number indicating the step size in the line search step. Default is 0.1.
An integer variable indicating maximum number of try when searching for optimal step length in ever iteration. Default is Inf.
A string indicating the method used in searching the step length t. t = 1 + h \times a^i for "geometric" and t = 1 + i \times h for "arithmetic". Default is "geometric".
A function projecting the parameter after each iteration. Default is identity function f(x) = x.
A non-negative scalar that dictates the degree of non-montonicity. Default is 0. Set objfn.inc = 0 to obtain monotone convergence. Setting objfn.inc = Inf gives a non-monotone scheme. In-between values result in partially-monotone convergence.
A small, positive scalar that determines when iterations should be terminated, see convtype
for details. Default is 1e-7
An integer denoting the maximum limit on the number of evaluations of fixptfn
. Default is 2000.
A string indicating the convergence criteria.
If it is "parameter", the algorithm will termenate when L2 norm of parameters difference x_{new} - x_{old} < tol.
If it is "objfn", the algorithm will terminate when the absolute difference of objective function |L_{new} - L_{old}| < tol.
If it is "user" or conv.spec
is not NULL
. Then the convergence is guided by the user defined function conv.spec
.
Default is "parameter".
An bool value indicating whether to track parameters along the algorithm. TRUE
for tracking and FALSE
for not. Default is FALSE
A function for user specified convergence criteria. When using "parameter" or "objfn" option in convtype
, this should be NULL
.
The function should have the form f(old_parameter, new_parameter, old_objective, new_objective, tolerance)
and return 1 if convergent, 0 if not.
Defalut is NULL
.
A list of results
par |
Parameter values, x* that are the fixed-point of fixptfn F such that x*=F(x*) if convergence is successful. |
value.objfn |
The objective function value at termination. |
fpevals |
Number of times the fixed-point function |
objfevals |
Number of times the objective function |
iter |
Numbers of iteration used at termination. (for different algorithms, multiple fixed point iteration might be evaluated in one iteration) |
convergence |
An integer code indicating whether the algorithm converges. 1 for convergence and 0 denote failure. |
objfn.track |
An array tracking objective function values along the algorithm |
par.track |
A matrix tracking parameters along the algorithm, where each row is an array of parameters at some iteration. If not tracking paramters, this will be |
Berlinet A, Roland C (2009). Parabolic acceleration of the EM algorithm. Statistics and Computing, 19(1): 35–47.
## Not run: set.seed(54321) prob = lasso_task(lam=1) parabolic_em(prob$initfn(), prob$fixptfn, prob$objfn, X=prob$X, y=prob$y) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.