After the train-only mean is computed, keep it fixed for held-out scoring.
highlighted = computed this step
Freeze the constant baseline
The constant baseline is the train mean: 4. That value is now used as the prediction for held-out rows.
y^constant=4
Both held-out predictions use the same value
For row D, prediction is 4. For row E, prediction is also 4.
y^D=4,y^E=4
Do not retune on the test rows
The test rows are scored with the frozen baseline. They do not change the train mean after being seen.
freeze, then score held-out rows