fn shrink(x: f64, threshold: f64) -> f64
Soft thresholding (shrinkage) operator for L1 regularization shrink(x, t) = sign(x) * max(|x| - t, 0)