soft_thresholding {ShiVa} | R Documentation |
Soft Thresholding
Description
Applies the soft thresholding operation to a numeric input, commonly used in Lasso and sparse modeling to induce shrinkage and sparsity.
Usage
soft_thresholding(z, lambda)
Arguments
z |
A numeric value to be thresholded. |
lambda |
A non-negative numeric value indicating the threshold level (degree of shrinkage). |
Value
A numeric value after applying soft thresholding:
\text{sign}(z) \cdot \max(|z| - \lambda, 0)
.
[Package ShiVa version 1.0.1 Index]