Solves the weighted Fused LASSO Signal Approximator optimization problem using an ADMM-based approach. The problem is formulated as follows: $$ \hat{\beta} = \operatorname{argmin} \frac{1}{2} || y - \beta ||_2^2 + \lambda_1 ||\beta ||_1 + \lambda_2 \sum_{i < j} w_{ij} | \beta_i - \beta_j | $$ where:
\(y\) is the response with mean \(0\).
\(\beta\) is the vector of coefficients to be estimated.
\(|| \cdot ||_1\) and \(|| \cdot ||_2\) are the \(L_1\)- and \(L_2\)-norms, respectively.
\(\lambda_1 > 0\) is the regularization parameter controlling the strength of the sparsity penalty.
\(\lambda_2 > 0\) is the regularization parameter controlling the smoothness.
\(w_{ij} \in [0,1]\) is the weight between the \(i\)-th and \(j\)-th coefficient.
Arguments
- y
Vector of length \(p\) representing the response variable (assumed to be centered).
- W
Weight matrix of dimensions \(p \times p\).
- lambda1
Vector of positive regularization parameters for \(L_1\) penalty.
- lambda2
Vector of positive regularization parameters for smoothness penalty.
- rho
ADMM's parameter (Default:
1
).- max_iter
Maximum number of iterations (Default:
1e5
).- eps
Stopping criterion. If differences are smaller than
eps
, the algorithm halts (Default:1e-10
).- truncate
Values below
truncate
are set to0
(Default:1e-4
).- offset
Logical indicating whether to include an intercept term (Default:
TRUE
).
Value
A list containing:
betas
: Estimated vector \(\hat{\beta}\) from the Weighted Fused LASSO.tuning_parameters
: Data frame with tuning parameters. The columndf
contains the number of non-zero coefficients for the different lambda-valuesall input variables.