Skip to content
CampusEduX

Problem 3: Compare Coefficient Magnitudes After Scaling

Easypython
Learn the Concept: Multiple Linear Regression

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.

Related Problems

  • Problem 1: Fit a Multiple Linear Regression Model
    Easy · python
    Solve Problem
  • Problem 2: Predict Using Multiple Features
    Easy · python
    Solve Problem
  • Problem 4: Check for Multicollinearity Before Modeling
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...