quasi_newton: Quasi Newton Method for Accelerating Slowly-Convergent...

View source: R/qn.R

quasi_newtonR Documentation

Quasi Newton Method for Accelerating Slowly-Convergent Fixed-Point Iterations

Description

An implementation of quasi Newton method described in Zhou (2011). Including monotonicity control and projection.

Usage

quasi_newton(par, fixptfn, objfn, ..., control = list())

Arguments

par

Vector for initial parameters

fixptfn

Fixed point updating function

objfn

Objective function

...

Other arguments required by fixptfn and objfn

control

A list containing parameters controlling the algorithm

Details

The task it to minimize objfn. Default values of control are: qn=3, mono.tol=1, projection=function(x) x, tol=1e-7, maxiter=2000, convtype="parameter", par.track=FALSE, conv.spec=NULL.

qn

An integer variable indicating the order of Quasi-Newton algorithm used. Default is 3.

mono.tol

A non-negative scalar that dictates the degree of non-montonicity. Default is 1. 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.

projection

A function projecting the parameter after each iteration. Default is identity function f(x) = x

tol

A small, positive scalar that determines when iterations should be terminated, see convtype for details. Default is 1e-7

maxiter

An integer denoting the maximum limit on the number of evaluations of fixptfn. Default is 2000.

convtype

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".

par.track

An bool value indicating whether to track parameters along the algorithm. TRUE for tracking and FALSE for not. Default is FALSE

conv.spec

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.

Value

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 fixptfn was evaluated.

objfevals

Number of times the objective function objfn was evaluated.

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 NULL

References

Zhou H, Alexander D, Lange K (2011). A quasi-Newton acceleration for high-dimensional optimization algorithms. Statistics and Computing, 21(2): 261–273.

Examples

## Not run: 
set.seed(54321)
prob = lasso_task(lam=1)
quasi_newton(prob$initfn(), prob$fixptfn, prob$objfn, X=prob$X, y=prob$y)

## End(Not run)


bhtang127/AccelBenchmark documentation built on May 30, 2022, 2:21 a.m.