Linear Regression · Module 5

Evaluation

A line that fits training data must still work on unseen test hours.

Hold out test data

Train on early examples. Keep the last rows as a test set. Report error on both — if train is great but test is poor, the model memorized instead of learning.

Diagram — Train vs test

Train set learn m and b Test set measure generalization
MAEavg |error|

Easy to explain in marks.

MSE / RMSEpenalize big misses

Sensitive to outliers.

R²explained variance

1.0 = perfect, 0 = no better than mean.

Remember: Always quote test metrics when you claim the model works.