powered by
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 )
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.
the matrix (of size n*p) of the covariates.
a vector of length n with the response.
a positive real. Parameter associated with the lasso penalty.
a positive real. Parameter associated with the fusion penalty.
Maximal number of steps for EM algorithm.
Number of steps before regrouping some variables in segment.
If TRUE, there is an intercept in the model.
"linear" or "logistic"
tolerance for convergence of the EM algorithm.
Zero tolerance. Coefficients under this value are set to zero.
tolerance for convergence of the conjugate gradient.
Quentin Grimonprez, Serge Iovleff
EMcvfusedlasso
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)
Run the code above in your browser using DataLab