EMfusedlasso {HDPenReg} | R Documentation |
EM algorithm for fused-lasso penalty
EMfusedlasso(X, y, lambda1, lambda2, maxSteps = 1000, burn = 50, intercept = TRUE, model = c("linear", "logistic"), eps = 1e-05, eps0 = 1e-08, epsCG = 1e-08)
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. |
A list containing :
Vector containing the number of steps of the algorithm for every lambda.
List of vector of size "step+1". The i+1-th item contains the index of non-zero coefficients at the i-th step.
List of vector of size "step+1". The i+1-th item contains the non-zero coefficients at the i-th step.
Vector of length "step+1", containing the lambda at each step.
Intercept.
Quentin Grimonprez, Serge Iovleff
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)