Time series and forecasting · insight-0230
Enforce positivity with a transformation, not by clipping negative forecasts to zero
- Evidence type
- documented fact
- Difficulty
- medium
- Roles
- Data scientist
- Industries
- retail, aviation
Summary: situation, action, reason, boundary
Situation
A linear or ML forecast of low-volume sales produces negative values, and the pipeline replaces them with zero.
Action
Model on a log scale (or a scaled logit for bounded series) so forecasts and intervals stay within limits, or use a count distribution for low counts; compare against the clipped version in a backtest.
Reason
Transforming the data before modelling and back-transforming afterwards keeps point forecasts and intervals within the permitted range.
Boundary
Sales, passengers, load factors bounded between 0 and 1, conversion rates.
Symptom or risk
Clipping changes the forecast distribution after the fact, biases totals upward, and leaves intervals that still extend below zero.
Exceptions
Series with exact zeros cannot be logged directly; log(y+1) distorts small counts, so a count model may be better.
Trade-offs
Transformations need back-transform bias handling for means.
Pitfalls
Clipping inside the backtest but not in production, or the reverse.
Lessons and concepts
Claims and their sources
FPP3 uses transformations such as the log, or a scaled logit for interval constraints, to keep forecasts within limits.