Machine Learning · Chapter 9 of 40
Multiple Linear Regression
Same as linear regression, but with MULTIPLE features: `y = w1·x1 + w2·x2 + ... + b`.
Each coefficient tells you how much y changes when that feature increases by 1 (holding others fixed).
Example 1 (python)
from sklearn.linear_model import LinearRegression
# X has multiple columns (features)
m = LinearRegression().fit(X, y)
print(m.coef_)Output
[2.5, -1.3, 0.7]One coefficient per feature.
Example 2 (python)
# Check feature importance by absolute coef sizeLarger |coef| = more influence.
Key points
- y depends on many features.
- One coefficient per feature.
- Same fit/predict API.
- Watch for multicollinearity.
💡 Note: Highly correlated features (multicollinearity) make coefficients unstable. Drop or combine them.
