coordinateDescentQuad: l1-penalized coordinate descent

Description Usage Arguments Details Value Author(s) See Also

View source: R/Optimization.R

Description

Optimizes an l1-penalized loss using a coordinate wise descent algorithm.

Usage

1
2
3
coordinateDescentQuad(f, gr, quad, p, beta, lambda = NULL, nlambda = 50,
  lambda.min.ratio = 0.001, penalty.factor = rep(1, p), rho = 0.9,
  c = 1e-04, reltol = sqrt(.Machine$double.eps), trace = 0)

Arguments

f

a function. The loss function. A function of beta.

gr

a function. The gradient of the loss. A function of beta.

quad

a function. The coordinate wise quadratic approximation term. A function of the coordinate index and beta.

p

a numeric. The length of the parameter vector.

beta

a numeric. The vector of initial parameter values. If p is missing beta must be specified. When p is specified, the value of the beta argument is ignored, and beta = rep(0, p).

lambda

a numeric. A sequence of penalties. The default value NULL implies an automatic computation of a suitable sequence.

nlambda

a numeric. The number of lambda values.

lambda.min.ratio

a numeric. Determines the smallest value of lambda relative to the largest (automatically) determined value of lambda.

penalty.factor

a numeric. A vector of penalty weight factors.

rho

a numeric. Step length control in the backtracking.

c

a numeric. Sufficient decrease control in the backtracking.

reltol

a numeric. Controls the convergence criterion.

trace

a numeric. Values above 0 prints increasing amounts of trace information.

Details

The function computes a matrix of optimal parameter values. Each column corresponds to a value of the penalty parameter in lambda. The estimates are computed in decreasing order of the penalty parameters, and for each column the previous is used as a warm start.

The algorithm relies on iterative optimization of an l1-penalized quadratic approximation of the loss using a standard coordinate wise descent algorithm. A coordinate wise backtracking step is added to ensure that the algorithm takes descent steps.

This function relies on three auxiliary functions. The loss function f, its gradient gr and a third function, quad, that computes the coefficient of the quadratic approximation for the coordinate wise optimization.

The function returns a list with the vector of lambda values as the first entry and the estimated beta parameters as a matrix in the second entry. Each column in the matrix corresponds to one lambda value.

Value

A list of length 2. The first entry is the sequence lambda, and the second, beta, is the matrix of parameter estimates. Each column in beta corresponds to an entry in lambda.

Author(s)

Niels Richard Hansen Niels.R.Hansen@math.ku.dk

See Also

coordinateDescent.


smde documentation built on May 2, 2019, 4:58 p.m.