Skip to main content

shrink

Function shrink 

Source
fn shrink(x: f64, threshold: f64) -> f64
Expand description

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