How to use this calculator
Apply the exact proximal operator of an L1 penalty to a vector, producing sparse coordinates.
- Enter Input vector, L1 penalty strength, Proximal step scale. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
L1 proximal soft threshold step explained
Apply one L1 proximal update coordinate by coordinate: values within the threshold become zero, while larger magnitudes shrink toward zero without changing sign.
Inputs, symbols, and units
v— Input vector- Coordinates before the proximal update. Use comma-separated values in the stated order.
lambda— L1 penalty strength- Nonnegative coefficient multiplying the L1 norm.
step— Proximal step scale- Positive scale multiplying the penalty.
Formula and method
proxₜ||·||₁(v)ᵢ=sign(vᵢ)max(|vᵢ|−t,0), t=step·λ.
The displayed objective is one half squared Euclidean movement plus t times the output L1 norm. This isolated proximal step is a building block, not a full fitted lasso model.
A worked scenario
Input vector = [3, -1, 0.2]; L1 penalty strength = 0.5; Proximal step scale = 1.
- First proximal coordinate: 2.5
- Nonzero coordinates: 2
- Proximal objective: 1.77 coordinate squared units
- Complete proximal vector: 2.50000000000, -0.500000000000, 0.00000000000 component order
With threshold 0.5, input (3,−1,0.2) becomes (2.5,−0.5,0), leaving two nonzero coordinates.
Assumptions and edge cases
Coordinatewise L1 penalty only. Coupled group penalties, nonnegativity or a nonidentity quadratic require another operator.
Reading the outputs
First coordinate and nonzero count describe sparsity; objective combines the movement and penalty under the stated normalized units. The complete solved vector or profile is also listed in the original component order, so no coordinate is hidden.
Frequently asked questions
Is soft thresholding the same as dropping small entries?
No. Surviving entries also shrink toward zero.
What happens at exactly the threshold?
The output is zero.
Does this fit a regression model?
No. It applies one proximal operator to an already supplied vector.
How do I use the L1 proximal soft threshold step calculator?
Enter Input vector, L1 penalty strength, Proximal step scale. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of L1 proximal soft threshold step?
Input vector = [3, -1, 0.2]; L1 penalty strength = 0.5; Proximal step scale = 1. First proximal coordinate: 2.5 Nonzero coordinates: 2 Proximal objective: 1.77 coordinate squared units Complete proximal vector: 2.50000000000, -0.500000000000, 0.00000000000 component order With threshold 0.5, input (3,−1,0.2) becomes (2.5,−0.5,0), leaving two nonzero coordinates.
Background or definition reference: Boyd and Vandenberghe Convex Optimization.
Read our calculation methodology.