inspre: Finds the inverse of X using Inverse Sparse Regression.

View source: R/inspre.R

inspreR Documentation

Finds the inverse of X using Inverse Sparse Regression.

Description

Finds the inverse of X using Inverse Sparse Regression.

Usage

inspre(
  X,
  W = NULL,
  rho = 10,
  lambda = NULL,
  lambda_min_ratio = 0.01,
  nlambda = 20,
  alpha = 0,
  gamma = NULL,
  its = 100,
  delta_target = 1e-04,
  symmetrize = FALSE,
  verbose = 1,
  train_prop = 0.8,
  cv_folds = 0,
  mu = 10,
  tau = 2,
  solve_its = 3,
  ncores = 1,
  warm_start = TRUE,
  min_nz = 1e-05,
  constraint = "UV",
  DAG = FALSE
)

Arguments

X

DxD Matrix to find approximate sparse inverse of.

W

DxD Matrix of weights.

rho

Float. Initial learning rate for ADMM.

lambda

Float, sequence of floats of NULL. L1 regularization strength on inverse of X. If NULL, a logarithmicallly spaced set of values between the maximimum absolute off diagonal element of X and lambda_min_ratio times this value will be used.

lambda_min_ratio

Float, ratio of maximum lambda to minimum lambda.

nlambda

Integer. Number of lambda values to try.

alpha

Float between 0 and 1 or NULL. If > 0, the model will be fit once with gamma = 0 to find L0, then all subsequent fits will use gamma = alpha * L0 / D. Set to NULL to provide gamma directly.

gamma

Float or sequence of nlambda floats or NULL. Determinant regularization strength to use (for each lambda value). It is recommended to set alpha rather than setting this directly.

its

Integer. Maximum number of iterations.

delta_target

Float. Target change in solution.

symmetrize

True to force the output to be symmetric. If the input is symmetric, the output isn't always perfectly symmetric due to numerical issues.

verbose

0, 1 or 2. 2 to print convergence progress for each lambda, 1 to print convergence result for each lambda, 0 for no output.

train_prop

Float between 0 and 1. Proportion of data to use for training in cross-validation.

cv_folds

Integer. Number of cross-validation folds to perform.

mu

rho modification parameter for ADMM. Rho will be increased/decreased when the dual constrant and primal constraint are off by a factor of > mu.

tau

rho modification parameter for ADMM. When called for, rho will be increased/decreased by the factor tau.

solve_its

Integer, number of iterations of bicgstab/lasso to run for each U and V update.

ncores

Integer, number of cores to use.

warm_start

Boolean, TRUE to start next fit with result of previous fit. Default FALSE.

constraint

One of "UV" or "VU". Constraint to use.

DAG

Bool. True to resitrict solutions to approximate DAGs.


brielin/inspre documentation built on Dec. 3, 2023, 4:55 a.m.