shrinkage.LassoFit
Shrinkage for Python · python · 0.2.0
Owned lasso parameters, fitted preprocessing, and final diagnostics.
Check termination before treating a fit as converged. Properties are read-only, and returned arrays are independent copies. The result retains neither the training arrays nor their Rust snapshots.
coefficients
Source: packages/python/src/shrinkage/lasso.py
-> Original-scale coefficients with shape (n_features,).
intercept
Source: packages/python/src/shrinkage/lasso.py
-> Original-scale intercept, including the correction for centering.
preprocessing
Source: packages/python/src/shrinkage/lasso.py
-> Training transformations; prediction never estimates new ones.
termination
Source: packages/python/src/shrinkage/lasso.py
-> "converged" or "iteration_limit" from the Rust solver.
iterations
Source: packages/python/src/shrinkage/lasso.py
-> Complete coordinate sweeps; initially optimal fits take zero.
objective
Source: packages/python/src/shrinkage/lasso.py
-> Final average squared loss plus the optimization-scale L1 penalty.
kkt_violation
Source: packages/python/src/shrinkage/lasso.py
-> Maximum KKT violation, including the free intercept derivative.
dual_certificate
Source: packages/python/src/shrinkage/lasso.py
-> Feasible Gaussian dual vector theta with shape (n_samples,).
dual_objective
Source: packages/python/src/shrinkage/lasso.py
-> Dual objective D(theta) = y @ theta - n * ||theta||**2 / 2.
duality_gap
Source: packages/python/src/shrinkage/lasso.py
-> Gap G(beta_0, beta, theta) = P(beta_0, beta) - D(theta).
The nonnegative gap can be loose at zero penalty.
reference_loss
Source: packages/python/src/shrinkage/lasso.py
-> Fixed average loss at zero coefficients and the optimal free intercept.
stopping
Source: packages/python/src/shrinkage/lasso.py
-> Resolved criterion, including the default selected for this penalty.
stopping_value
Source: packages/python/src/shrinkage/lasso.py
-> Final value of the selected convergence check on refreshed state.
stopping_threshold
Source: packages/python/src/shrinkage/lasso.py
-> Threshold applied to the selected convergence check.
predict
Source: packages/python/src/shrinkage/lasso.py
-> Predict raw NumPy float64 rows, returning shape (n_samples,).
Use training-column order. The dense input contract also applies here, with empty batches allowed. Prediction copies inputs before releasing the GIL, uses original-scale parameters, and never refits preprocessing. Invalid shapes or values raise TypeError or ValueError; nonfinite prediction arithmetic raises FloatingPointError.
