← 返回数据练习

用一年的历史数据,预测未来 30 天的广告展示量

2 张表 · 395 行畅练卡解锁

这道题的中文翻译正在进行中,下面先显示英文原文。

AdLoft serves ads on websites owned by its partner publishers; each ad shown is an ad impression. AdLoft sells this inventory to advertisers ahead of time, so it needs to know how many impressions it will be able to deliver in the coming weeks. Promising too many means under-delivering on campaigns; promising too few leaves inventory unsold.

Your goal is a model that takes a vector of 365 daily impression counts as input and returns a forecast for the next 30 days.

The data

  • training — one row per day for days 1–365: day, impressions.
  • validation — one row per day for the following 30 days (days 366–395), for evaluating your forecast.

There are no calendar dates, only day numbers, so any weekly or seasonal pattern has to be inferred from the series itself.

Your task

  1. Explore the training series: trend, weekly or other cycles, outliers, level shifts. Which of these features should a forecasting model capture, and which should it treat as noise?
  2. Build a forecasting approach and explain why you chose it and how you adapted it to this series. Compare it with at least one simple baseline (for example, repeating the last week, or a seasonal average) so it is clear what the extra complexity buys.
  3. Evaluate your 30-day forecast against validation. Choose the error metric(s) and defend them, show where the forecast misses most, and give a range around the forecast, not only a point estimate.
  4. Over-forecasting and under-forecasting cost AdLoft different things. How would that asymmetry change the number you hand to the sales team, or the model itself?
  5. How would you run this in production: how often to refit, how to tell when the model has gone stale, and which additional data (calendar dates, holidays, publisher-level counts, traffic sources) would most improve it?

What to deliver

A function or script that takes 365 daily counts and returns 30 forecasts; your forecast for days 366–395 alongside the actual values; and your forecast for days 396–425, refit on all 395 days. Add a short write-up (1–2 pages) for AdLoft’s data science lead explaining your reasoning, with commented code.

All company names in this question are fictional.

数据预览

training前 5 行
dayimpressions
125794978
283782674
370381396
478645910
599766524
validation前 5 行
dayimpressions
36655126752
36750880489
36859796778
36963726487
37056726960