This page assumes you have seen nothing. We build every letter, every bar, every symbol the parent note Regression metrics (MAE, MSE, RMSE, MAPE) throws at you — one at a time, each with a picture, in an order where nothing appears before it is earned.
Look at figure 1. The true rent sits at a solid dot on a number line; the model's guess sits at a hollow dot nearby. They almost never land on the same spot — that little space between them is the entire subject of this chapter.
Figure 1 — True value vs the model's guess. A number line for rent in $1000s: a solid coral dot marks the true value y=3.2, a hollow lavender dot marks the guess y^=3.9, and a double-headed arrow between them labels "the gap = residual."
You never have one rent to predict; you have a whole table of apartments. We need a way to say "the 3rd apartment" without inventing a new name every time.
Figure 2 shows the same four apartments as arrows: an arrow pointing right is a positive residual (undershoot), pointing left is negative (overshoot). The whole rest of the topic is: what do we do with these four arrows?
Figure 2 — Residuals keep a sign (direction of the miss). Four horizontal arrows, one per sample, spring from a central zero line: mint arrows point right for positive residuals (undershoot), coral arrows point left for negative residuals (overshoot), each labelled with its value e=+0.2, −0.3, and so on.
Two guesses can be equally bad while having opposite signs: −0.3 and +0.3 are both "off by 0.3." To score "how far, ignoring direction," we need a tool that removes the minus sign.
Look at figure 3: the residual arrows from figure 2 all get flipped to point the same way (rightward, all positive lengths) once we wrap them in ∣⋅∣. Their lengths are what we sum.
Figure 3 — Absolute value flips every miss positive. The same four arrows as figure 2, but now all lavender and all pointing right, each labelled with its magnitude ∣e∣=0.3,0.2,0.7,0.1 — the sign has been erased, only the length remains.
Absolute value is not the only sign-remover. Multiplying a number by itself also always gives a non-negative result, because a negative times a negative is positive.
Figure 4 draws both curves on the same axes: the V of ∣x∣ against the bowl of x2. Notice how the parabola sits below the V for small errors but rockets above it for large ones — that crossover is the whole personality difference between MAE and MSE.
Figure 4 — ∣x∣ vs x2: corner versus bowl. Two curves on the same error axis: the coral V-shape of the absolute value ∣x∣ with a sharp corner at zero, and the lavender parabola x2 which is smooth at zero but shoots far higher for large errors — a picture of why MSE punishes big misses more than MAE.
A raw sum grows just because you have more rows. Ten apartments will always "sum" to more error than four, even if the model is better. To compare fairly we divide by how many there are.
Now that every block is defined, we snap them together. Read each formula left to right as a sentence built from the pieces above.
Recall How each formula decodes into blocks
MAE ::: mean n1∑ + absolute ∣⋅∣ of the residual ei.
MSE ::: mean n1∑ + square x2 of the residual ei.
RMSE ::: square-root wrapped around MSE.
MAPE ::: mean n1∑ + absolute ∣⋅∣ + divide by yi + ×100%.
The diagram below shows how each foundation feeds the next and finally into the topic. In words: the true value y and guess y^ combine into the residual e=y−y^; the residual then flows two ways — through absolute value or through squaring — both of which get piled up by the sum ∑ and turned into a per-sample average (n1). The absolute-value branch gives MAE; the squared branch gives MSE; feeding MSE through the square root gives RMSE; and taking the absolute branch, dividing by yi then scaling by 100% gives MAPE. All four arrive at the parent topic.
When you meet a formula on the parent page, trace it back up this map — every symbol you see was defined above.