Skip to content
Aabha AI Academy
Skip to reading

Applied ML · Module 5

Answers and explanations · Compare regression rules and inspect their mistakes

Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.

Lesson 05 · Regression

Exercise 05.1

Actual minus predicted residuals are [−1, 2, −1, 2]. Absolute errors sum to 6, so MAE is 1.5 hours. Squared errors sum to 10, so RMSE is square root of 2.5, approximately 1.581 hours. Mean residual is 2/4 = 0.5 hour, indicating average underprediction in this small sample.

MAE summarizes average absolute magnitude but does not show direction or extreme-error concentration. RMSE emphasizes larger errors but is less directly representative of a typical absolute mistake. Mean residual reveals signed average bias but can hide cancellation. Individual residuals reveal specific mistakes without alone establishing a population pattern.

Exercise 05.2

One defensible experiment is a predeclared, modest nonlinear queue term in the Ridge pipeline, fitted and compared inside the same training-only temporal folds. Another is reducing forest complexity with a small declared grid. Choose one bounded experiment, retain the baseline and original candidates, and compare mean fold MAE plus fold patterns without using policy or final results to repeatedly search. High-queue underprediction suggests a hypothesis; it does not prove that queue curvature is the cause. The worse later-fold forest result argues against selecting it solely from training fit.

Exercise 05.3

A defensible rewrite is: “On the declared evaluation sample, R-squared was 0.8, meaning squared prediction error was 20% of the squared-error reference based on that sample's mean. This is not an 80% count of correct jobs; MAE, RMSE and residuals describe individual prediction errors. Queue size is associated with predictions under this fitted model and dataset. The study does not establish the effect of intervening on the queue.”

A constant-target sample requires additional care, and any reported score must identify the evaluation period rather than imply a universal result.

Exit check 05.A

Equal sums of absolute errors can have different concentrations. RMSE squares each error before averaging, so a few large errors contribute more than several smaller ones with the same total absolute magnitude.

Exit check 05.B

Imputers, scalers and encoders learn state too. If they see later fold rows, the regressor receives a representation influenced by held-out information even when its own fitting rows are correct.

Return to this module