skglm.AdaptiveGraphicalLasso#
- class skglm.AdaptiveGraphicalLasso(alpha=1.0, eps=1e-10, n_reweights=5, max_iter=1000, tol=1e-08, warm_start=False, penalty=<skglm.penalties.separable.L0_5 object>, verbose=False)[source]#
Adaptive version of the Graphical Lasso with non-convex penalties.
Solves non-convex penalty variations using an iterative reweighting strategy (Candès et al., 2007).
At each reweighting iteration, it solves
`\Theta^* = \underset{\Theta \succ 0}{\arg\min}\ -\log\det(\Theta) + \langle S, \Theta \rangle + \alpha \sum_{i \ne j} w_{ij}^{(k)} |\Theta_{ij}|`where the weights are updated as
`w_{ij}^{(k)} = \frac{1}{\epsilon} \quad \text{if } \Theta_{ij}^{(k-1)} = 0``w_{ij}^{(k)} = |p'(\Theta_{ij}^{(k-1)})| \quad \text{otherwise}`where `p'(\cdot)` is the derivative of the non-convex penalty function.
- Parameters:
- alphafloat, default=1.0
Regularization parameter controlling sparsity.
- epsfloat, default=1e-10
Small value for handling exactly zero elements in reweighting. Controls numerical stability of the adaptive algorithm.
- n_reweightsint, default=5
Number of reweighting iterations.
- max_iterint, default=1000
Maximum iterations for inner solver.
- tolfloat, default=1e-8
Convergence tolerance.
- warm_startbool, default=False
Whether to use warm start.
- penaltyPenalty object, default=L0_5(1.)
Non-convex penalty function. Must have a ‘derivative’ method. The penalty’s alpha parameter should typically match this class’s alpha.
- verbosebool, default=False
Whether to print verbose output.
- Attributes:
- precision_ndarray
Estimated precision (inverse covariance) matrix.
- covariance_ndarray
Estimated covariance matrix.
- n_iter_int
Number of iterations run.
References
[1]Candès et al., 2007.
- __init__(alpha=1.0, eps=1e-10, n_reweights=5, max_iter=1000, tol=1e-08, warm_start=False, penalty=<skglm.penalties.separable.L0_5 object>, verbose=False)[source]#
Methods
__init__
([alpha, eps, n_reweights, ...])fit
(X[, y, mode])Fit the AdaptiveGraphicalLasso model.
get_metadata_routing
()Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
set_fit_request
(*[, mode])Configure whether metadata should be requested to be passed to the
fit
method.set_params
(**params)Set the parameters of this estimator.