Problem 3: Compare Different Alpha Values
Easypython
Problem Description
Write a Python program that trains Ridge regression models with alpha values of 0.1, 1, and 100, comparing how the coefficient magnitudes shrink as alpha increases.
Input
A dataset with numeric features.
Output
The coefficients for each alpha value.
Constraints
- At least 5 data points.
Example Input
text(A dataset with 2 features across 5 rows)
Example Output
textalpha=0.1: [4.8, 2.1] alpha=1: [3.9, 1.7] alpha=100: [0.5, 0.3]
Concepts Covered
Ridge, alpha parameter, coefficient shrinkage.