Problem 1: Fit a Multiple Linear Regression Model
Easypython
Problem Description
Write a Python program that fits a Multiple Linear Regression model using two features (size and number of rooms) to predict house price, and prints the learned coefficients and intercept.
Input
A dataset with two feature columns and one target column.
Output
The learned coefficients and intercept.
Constraints
- At least 5 data points.
Example Input
textsize=[10,15,20,25,30], rooms=[2,3,3,4,4], price=[200,250,280,340,360]
Example Output
textIntercept: 45.71 Coefficients: [8.86, 8.00]
Concepts Covered
LinearRegression, multiple features, .coef_, .intercept_.