FISTA

FISTA(
  x,
  y,
  family = c("gaussian", "binomial", "multinomial", "poisson"),
  intercept = TRUE,
  center = !inherits(x, "sparseMatrix"),
  scale = c("l2", "l1", "sd", "none"),
  alpha = c("path", "estimate"),
  lambda = c("bh", "gaussian", "oscar"),
  alpha_min_ratio = if (NROW(x) < NCOL(x)) 0.01 else 1e-04,
  path_length = if (alpha[1] == "estimate") 1 else 20,
  q = 0.1 * min(1, NROW(x)/NCOL(x)),
  screen = TRUE,
  screen_alg = c("strong", "previous"),
  tol_dev_change = 1e-05,
  tol_dev_ratio = 0.995,
  max_variables = NROW(x),
  max_passes = 1e+06,
  tol_rel_gap = 1e-05,
  tol_infeas = 0.001,
  diagnostics = FALSE,
  verbosity = 0
)

Arguments

x

the design matrix, which can be either a dense matrix of the standard matrix class, or a sparse matrix inheriting from Matrix::sparseMatrix. Data frames will be converted to matrices internally.

y

the response, which for family = "gaussian" must be numeric; for family = "binomial" or family = "multinomial", it can be a factor.

family

model family

intercept

whether to fit an intercept

center

whether to center predictors or not by their mean. Defaults to TRUE if x is dense and FALSE otherwise.

scale

type of scaling to apply to predictors.

  • "l1" scales predictors to have L1 norms of one.

  • "l2" scales predictors to have L2 norms of one.#'

  • "sd" scales predictors to have a population standard deviation one.

  • "none" applies no scaling.

alpha

scale for regularization path: either a decreasing numeric vector (possibly of length 1) or a character vector; in the latter case, the choices are:

  • "path", which computes a regularization sequence where the first value corresponds to the intercept-only (null) model and the last to the almost-saturated model, and

  • "estimate", which estimates a single alpha using Algorithm 5 in Bogdan et al. (2015).

lambda

either a character vector indicating the method used to construct the lambda path or a numeric non-decreasing vector with length equal to the number of coefficients in the model; see section Regularization sequences for details.

alpha_min_ratio

smallest value for lambda as a fraction of lambda_max; used in the selection of alpha when alpha = "path"

path_length

length of regularization path; note that the path returned may still be shorter due to the early termination criteria given by tol_dev_change, tol_dev_ratio, and max_variables.

q

parameter controlling the shape of the lambda sequence, with usage varying depending on the type of path used and has no effect is a custom lambda sequence is used.

screen

(currently inactive) whether to use predictor screening rules (rules that allow some predictors to be discarded prior to fitting), which improve speed greatly when the number of predictors is larger than the number of observations.

screen_alg

(currently inactive) what type of screening algorithm to use.

  • "strong" uses the set from the strong screening rule and check against the full set

  • "previous" first fits with the previous active set, then checks against the strong set, and finally against the full set if there are no violations in the strong set

tol_dev_change

the regularization path is stopped if the fractional change in deviance falls below this value; note that this is automatically set to 0 if a alpha is manually entered

tol_dev_ratio

the regularization path is stopped if the deviance ratio \(1 - \mathrm{deviance}/\mathrm{(null-deviance)}\) is above this threshold

max_variables

criterion for stopping the path in terms of the maximum number of unique, nonzero coefficients in absolute value in model. For the multinomial family, this value will be multiplied internally with the number of levels of the response minus one.

max_passes

maximum number of passes (outer iterations) for solver

tol_rel_gap

stopping criterion for the duality gap

tol_infeas

stopping criterion for the level of infeasibility

diagnostics

whether to save diagnostics from the solver (timings and other values depending on type of solver)

verbosity

level of verbosity for displaying output from the program. Not completely developed. Use 3 just for now.