Recipe
The general regression recipe
Use when: you have a labeled dataset and need to predict a continuous numeric value
Goal: a tuned, honestly evaluated regression model with a documented baseline comparison
Taught in Which algorithm should I use?
Quick recipe
-
1
Confirm exactly what is being predicted. Note the time window, if one matters. Note which features are only known after the fact.
Why: the same leakage risk from classification applies here too, just for a number instead of a group.
-
2
Compute the error from always guessing the training set's mean target value. Do this before fitting anything more complex.
Why: an RMSE or MAE number only makes sense next to this reference point.
-
3
Fit a regularized linear regression, a random forest, and a gradient-boosted model for regression. Run all three through the identical Pipeline and CV setup.
Why: as with classification, different model families suit different relationships between features and target.
-
4
Pick the error metric that matches how errors actually matter here. RMSE punishes big errors harder than MAE does.
Why: two models with similar R-squared can still have very different error patterns, depending on which metric is used.
-
5
Apply random or Bayesian search. Use it only on the single strongest candidate from the last step.
Why: same reasoning as the classification recipe -- tuning time is best spent on the already-strongest starting point.
-
6
Check feature importance as a final sanity check. Then save the entire fitted Pipeline together.
Why: the same mismatch risk applies, whether the target is a group or a number.
Common mistakes
- Reporting RMSE with no baseline error to compare it against.
- Ignoring whether errors should be punished evenly (MAE) or more for large misses (RMSE), before picking a metric.