Forecast Ad Avails for Arbitrary Targeting Combinations
Last updated: November 29, 2026
Quick Overview
Sales needs to know how many ad impressions (avails) will be available next month for any combination of targeting filters such as geo, audience segment, content genre and daypart. How would you model and serve these forecasts, and how would you measure their accuracy?
Roku
November 29, 20260
0
0 solved
Sales needs to know how many ad impressions (avails) will be available next month for any combination of targeting filters such as geo, audience segment, content genre and daypart. How would you model and serve these forecasts, and how would you measure their accuracy?
Roku's engineering blog describes an ad avails forecasting team using Apache Pinot and Trino, because advertisers decide spend based on how much inventory exists for their targeting. The interviewer checks that you avoid training one model per combination, handle overlap with already-booked campaigns, and evaluate forecasts honestly.
What the Interviewer Expects
- Recognizes the combinatorial explosion of targeting combinations
- Proposes forecasting total inventory over time and applying a sampled or sketch-based share for the filter
- Handles seasonality, holidays and live events
- Distinguishes total avails from unsold (net of booked campaigns)
- Defines accuracy metrics such as weighted MAPE by revenue and checks calibration of intervals
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How do you handle a new audience segment with no history?
- How would you return an answer in under a second for an interactive planning tool?
- How do frequency caps change available impressions for a campaign?
- How would you report uncertainty to a salesperson?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
An avail is an ad opportunity (a slot in a pod or a home screen unit) that could serve. Questions: horizon (next 30 to 90 days), granularity (daily), whether the answer must be net of already-booked c...
Approach
Decompose: . Forecast the total daily opportunities with a time series model (seasonality by weekday, annual pattern, holidays, known l...