Start with a worked example
Open the worked example for Ridge regression. The example starts with Ridge penalty λ₂ = 2.
Ridge Regression Calculator formula
After centering x and y, slope=Sxy/(Sxx+λ₂); intercept=ȳ−slope×x̄. Objective: ½SSE+½λ₂b².
Inputs and units
| Input | Format / range | Example |
|---|---|---|
| x,y pairs — one per line | Follow the input format above | 0,1
1,3
2,5
3,7
4,9 |
| Ridge penalty λ₂ | min 0 | 2 |
Worked example
The values listed in Inputs and units give y = 1.6666666667 + 1.6666666667x for Ridge regression.
- Ridge regression
- y = 1.6666666667 + 1.6666666667x
- Intercept
- 1.666666666667
- Slope
- 1.666666666667
- Sxx
- 10
- Sxy
- 20
Results and assumptions
Change Ridge penalty λ₂ from 2 to 2.2 and keep the other example inputs fixed. The updated answer is y = 1.7213114754 + 1.6393442623x (Ridge regression).
Fix an input or unexpected result
Ridge penalty λ₂ is required. Enter ridge penalty λ₂ using the format and bounds in the input table. Zero and an empty field are different: use zero only if it is allowed and represents your data.
