Back to the lessonPreparing the printout…

Fundamental of Machine Learning · Module 2: Core Machine Learning Algorithms

Linear Regression

[markdown] content available only on the platform

[markdown] content available only on the platform

Flashcards · Linear Regression

Coefficient (weight) — The change in the predicted output for a one-unit increase in a feature, with other features held fixed.

area coefficient 0.05: +0.05 billion VND per extra m2.

Intercept — The model's prediction when every feature equals zero.

model.intercept_

model.coef_ — The scikit-learn attribute holding one learned weight per feature of a linear model.

print(model.coef_) -> [0.045 0.12]

Linearity assumption — The assumption that the output changes in a straight-line way with the features.

Violated if the scatter plot shows a clear curve.

Constant error variance — The assumption that prediction errors have roughly the same spread across all predicted values.

Errors should not grow larger for expensive houses.

Underfitting — A model too simple to capture the real pattern, so it performs poorly even on training data.

A straight line fitted to a clearly curved relationship.

Unit dependence of coefficients — A coefficient's size changes with the unit of its feature, even though its meaning does not.

Metres to centimetres makes the coefficient 100 times smaller.

Standardise before comparing — Put features on the same scale before using coefficient sizes to compare feature importance.

StandardScaler, then compare abs(model.coef_).

Fundamental of Machine Learning · Linear Regression · printed on November 21, 2026