Skip to content
C

Problem 3: Compare Coefficient Magnitudes After Scaling

Easypython

Problem Description

Write a Python program that scales two features using StandardScaler, then trains a Multiple Linear Regression model on the scaled data, printing the resulting coefficients for fair comparison.

Input

A dataset with two features of very different scales (e.g., age and salary).

Output

The coefficients learned after scaling, allowing fair magnitude comparison.

Constraints

  • At least 5 data points.

Example Input

text
age=[25,30,35,40,45], salary=[30000,40000,50000,60000,70000], target=[1,2,3,4,5]

Example Output

text
Coefficients (scaled): [c1, c2]

Concepts Covered

StandardScaler, LinearRegression, coefficient interpretation.

Input (stdin)

Output

Run your code to see output here...