MLA-C01 Data preparation for ML

A forecasting team builds features from an event log and wants a seven-day trailing average plus a 30-day rolling maximum for each entity. Which operation produces these?

Show answer and explanation

Answer: A

Window functions evaluate an aggregate over a frame relative to the current row, for example rows between six preceding and the current row, producing a trailing seven-day mean that changes at each timestamp. Partitioning by entity keeps each customer or SKU's history separate. The frame must exclude the label period to avoid leakage, and the same pattern yields rolling sums, maximums and counts. These derived features often carry most of the predictive signal in demand and risk models.

Why the other options are wrong

  • B. Dropping the timestamp destroys the ordering the frame depends on and creates no aggregation at all.
  • C. One-hot encoding marks which entity a row belongs to; it does not summarise values over time.
  • D. Min-max scaling rescales individual values into a range and does not combine neighbouring periods.

Keep going. 212 MLA-C01 questions, answers explained after each one.

Practise data preparation for ML

Reviewed November 2026. Spotted a problem with this question? Report it from the practice tool.