blockwise_coordinate_descent_general: Blockwise coordinate descent

Description Usage Arguments Details Value See Also

View source: R/blockwise_coordinate_descent_general.R

Description

Implement blockwise coordinate descent algorithm. Best penalty value is evaluated through cross-validation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
blockwise_coordinate_descent_general(
  Z,
  y,
  n,
  p,
  p1,
  p2,
  p3,
  center.Z = TRUE,
  scale.Z = TRUE,
  center.y = TRUE,
  scale.y = TRUE,
  lambda.factor = ifelse(dim(Z)[1] < dim(Z)[2], 0.01, 0.001),
  step = 100,
  K = 4,
  mu = 10,
  tau = NULL,
  etol = 1e-04,
  optTol = 1e-05,
  earlyStopping_max = 10,
  penalty = c("lasso", "SCAD"),
  mode = "ADMM"
)

Arguments

Z

Corrupted design matrix (with additive error or missing data)

y

Response vector

n

Number of samples of the design matrix

p

Number of features of the matrix

p1

Number of uncorrupted predictors

p2

Number of corrupted predictors containing additive error

p3

Number of corrupted predictors containing missingness

center.Z

If TRUE, centers Z matrix without taking into account NAs values, and then change NAs to 0 value (in the missing data setting).

scale.Z

If TRUE, divides Z columns by their standard deviation

center.y

If TRUE, centers y

scale.y

If TRUE, divides y by its standard deviation

lambda.factor

Range of the lambda interval we are going to explore

step

Number of values of lambda in the interval we are going to test

K

Number of folds for the cross-validation

mu

Penalty parameter for the ADMM algorithm

tau

Standard deviation for the additive error matrix in the additive error setting (NULL in the missing data setting)

etol

Tolerance parameter for the ADMM algorithm

optTol

Tolerance parameter for the convergence of the error in the pathwise coordinate descent

earlyStopping_max

Number of iterations allowed when error starts increasing

penalty

Type of penalty used : can be lasso penalty or SCAD penalty

mode

ADMM or HM

Details

It is highly recommended to use center.Z = TRUE for the algorithm to work in the case of missing data. Otherwise the algorithm will not work the way it is intended. It is recommended to use center.Z = TRUE, scale.Z = TRUE, center.y = TRUE and scale.y = TRUE for both convergence and interpretability reasons. The use of center.Z = TRUE in the additive error setting can be subject to discussion, as it may introduce bias in the algorithm. For computing speed reasons, if model is not converging or running slow, consider changing mu, decreasing etol or optTol or decreasing earlyStopping_max

Value

list containing

See Also

https://arxiv.org/pdf/1510.07123.pdf


celiaescribe/BDcocolasso documentation built on Feb. 11, 2020, 11:41 p.m.