Learn R Programming

genlasso (version 1.2)

filebackout: Process file backed fused lasso output

Description

This function processes output from a call to fusedlasso or fusedlasso2d when file backing is turned on.

Usage

filebackout(object, y, X, file)

Arguments

object
a list object returned from either fusedlasso or fusedlasso2d when file backing is turned on. The user can specify this object, or y
y
a numeric response vector.
X
a numeric matrix of predictors, which if missing, is interpreted as the identity matrix.
file
a character string indicating the name of the file.

Value

  • Returns an object of class "fusedlasso" and subclass "genlasso", which should be indentical in all regards to the result of a non-file backed output, with the one minor exception of the "call" argument. This is a list with at least the following components:
  • lambdavalues of lambda at which the solution path changes slope, i.e., kinks or knots.
  • betaa matrix of primal coefficients, each column corresponding to a knot in the solution path.
  • fita matrix of fitted values, each column corresponding to a knot in the solution path.
  • ua matrix of dual coefficients, each column corresponding to a knot in the solution path.
  • hita vector of logical values indicating if a new variable in the dual solution hit the box contraint boundary. A value of FALSE indicates a variable leaving the boundary.
  • dfa vector giving an unbiased estimate of the degrees of freedom of the fit at each knot in the solution path.
  • ythe observed response vector. Useful for plotting and other methods.
  • completepatha logical variable indicating whether the complete path was computed (terminating the path early with the maxsteps or minlam options results in a value of FALSE).
  • blsthe least squares solution, i.e., the solution at lambda = 0. This can be NULL when completepath is FALSE.
  • gammathe value of the lambda ratio parameter.
  • callthe matched call.

Details

For very large problems, it may be easier to extract the output manually via readline. Another benefit of the file backing is that the model, up to the current point, can be extracted even if the model fitting process quit for some reason.

See Also

fusedlasso, fusedlasso2d