coordinateDescentMF: l1-penalized matrix free least squares coordinate descent

Description Usage Arguments Details Value Author(s) See Also

View source: R/Optimization.R

Description

Computes l1-penalized least squares estimates using a coordinate wise descent algorithm of Gauss-Newton quadratic approximations using a matrix free algorithm.

Usage

1
2
3
coordinateDescentMF(f, gr, cp, 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, N = 1000)

Arguments

f

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

gr

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

cp

a function. Computes one column in the cross product of the derivative of the mean value map. 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.

N

a numeric. The maximal number of interations in the loops.

Details

The function computes a matrix of parameter estimates. 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 the l1-penalized Gauss-Newton quadratic approximation using a standard coordinate wise descent algorithm. An outer backtracking step is added to ensure that the algorithm takes descent steps. This algorithm is matrix free, which means that it does not internally operate with the entire derivative of the mean value map. Instead, it relies on auxiliary functions to compute the loss, the gradient of the loss and inner products of columns in the derivative of the mean value map.

This function relies on three auxiliary functions. The loss function f, its gradient gr and a third function, cp, that computes the cross product of the derivative of the mean value map one column at a time.

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 3. The first element is the sequence lambda, and the second, beta, is the matrix of parameter estimates. Each column in beta corresponds to an entry in lambda. The third element is status, where 0 means convergence, and 1 means termination due to maximal number of interations reached (for some 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.