Chain fused lasso
Chain fused lasso encourages sparse, piecewise constant coefficients in the supplied feature order. Adjacent equal effects form contiguous segments. Weights default to one. .with_weights(...) takes exactly one finite, nonnegative weight per edge; a zero weight cuts the chain.
Constraint region
Top: , . Bottom: , , , giving an unbounded pure-fusion strip. See the plot conventions for the fixed budget and coefficient scale.
Use the penalty
use ;
Each edge contributes once. Empty and single-feature chains have no edges. Zero fusion recovers lasso. A two-feature chain has one pair, so its unit-weight constraint region coincides with clustered lasso; larger chains only fuse neighbors. Gaussian and binomial fits support proximal gradient and hybrid. See the chain fused lasso guide for segment interpretation and detailed fitting controls.
