SFI.inference.sparse.lasso module

SFI.inference.sparse.lasso — ℓ₁-penalised regression (LASSO)

Solve the \(\ell_1\)-regularised normal-equations problem:

\[\hat C = \arg\min_C \; \tfrac{1}{2}\,C^\top G\,C \;-\; M^\top C \;+\; \alpha\,\|C\|_1\]

using proximal coordinate descent. No access to the raw design matrix \(\Phi\) is needed — only (M, G) — preserving the clean decoupling from the data pipeline.

Sweeping over a regularisation path of \(\alpha\) values produces supports at varying sparsity levels, from which a Pareto front is assembled.

class SFI.inference.sparse.lasso.LassoStrategy(*, alpha=None, n_alphas=50, max_iter=1000, tol=1e-07, report_time=False)[source]

Bases: SparsityStrategy

Coordinate-descent LASSO on the normal equations.

Parameters:
  • alpha (float or None) – Fixed regularisation strength. If None (default), an automatic log-spaced path from \(\alpha_{\max}\) (where the solution is entirely zero) down to \(10^{-4}\,\alpha_{\max}\) is constructed.

  • n_alphas (int, default 50) – Number of \(\alpha\) values in the automatic path.

  • max_iter (int, default 1000) – Maximum coordinate-descent iterations per \(\alpha\).

  • tol (float, default 1e-7) – Convergence tolerance (max absolute change in any coefficient).

  • report_time (bool, default False) – Log elapsed wall-clock time when done.

name: str = 'lasso'

Short identifier used in SparsityResult.method.

run(scorer, *, max_k, **_kwargs)[source]

Execute the search and return a SparsityResult.

Parameters:
  • scorer (SparseScorer) – Provides info_and_coeffs / vmap_info for evaluating candidate supports.

  • max_k (int) – Maximum model size to explore.

Return type:

SparsityResult