lpspline.penalties.smooth.Lasso#

class lpspline.penalties.smooth.Lasso(alpha: float = 1.0)[source]#

Bases: Penalty

L1 Lasso Regularization targeting coefficient sparsity.

property alpha: float#

Returns the scaling severity.

Returns:

Penalty tuning constant.

Return type:

float

build_penalty(s: Spline) list[source]#

Creates a Lasso penalty sum sequence evaluating $alpha * sum |v|$.

Parameters:

s (Spline) – The targeted function modeling bounds.

Returns:

A list of CVXPY absolute weighting expressions applied to the core equation metric.

Return type:

list