EMfusedlasso: EM algorithm for fused-lasso penalty

View source: R/EM.R

EMfusedlassoR Documentation

EM algorithm for fused-lasso penalty

Description

EM algorithm for fused-lasso penalty

Usage

EMfusedlasso(
  X,
  y,
  lambda1,
  lambda2,
  maxSteps = 1000,
  burn = 50,
  intercept = TRUE,
  model = c("linear", "logistic"),
  eps = 1e-05,
  eps0 = 1e-08,
  epsCG = 1e-08
)

Arguments

X

the matrix (of size n*p) of the covariates.

y

a vector of length n with the response.

lambda1

a positive real. Parameter associated with the lasso penalty.

lambda2

a positive real. Parameter associated with the fusion penalty.

maxSteps

Maximal number of steps for EM algorithm.

burn

Number of steps before regrouping some variables in segment.

intercept

If TRUE, there is an intercept in the model.

model

"linear" or "logistic"

eps

tolerance for convergence of the EM algorithm.

eps0

Zero tolerance. Coefficients under this value are set to zero.

epsCG

tolerance for convergence of the conjugate gradient.

Value

A list containing :

step

Vector containing the number of steps of the algorithm for every lambda.

variable

List of vector of size "step+1". The i+1-th item contains the index of non-zero coefficients at the i-th step.

coefficient

List of vector of size "step+1". The i+1-th item contains the non-zero coefficients at the i-th step.

lambda

Vector of length "step+1", containing the lambda at each step.

mu

Intercept.

Author(s)

Quentin Grimonprez, Serge Iovleff

See Also

EMcvfusedlasso

Examples

dataset <- simul(50, 100, 0.4, 1, 10, matrix(c(0.1, 0.9, 0.02, 0.02), nrow = 2))
result <- EMfusedlasso(dataset$data, dataset$response, 1, 1)

HDPenReg documentation built on March 31, 2023, 9:31 p.m.