Temporal and Geographic Slices
What you'll learn: How to evaluate model performance across time periods and locations to catch hidden distribution shifts that aggregate metrics miss.
The Core Idea
Models trained on aggregate data often hide critical performance variations across when and where predictions happen. A fraud detection model might perform well overall but fail during holiday shopping seasons. A delivery time estimator might excel in urban areas but collapse in rural regions. Temporal and geographic slicing means deliberately splitting your evaluation data by time windows and location attributes to expose these hidden weaknesses.
Why This Matters
Imagine a weather prediction model with 90% accuracy overall. Sounds great—until you discover it's 95% accurate in summer but only 70% in winter. Or a ride-sharing pricing model that works perfectly in New York but catastrophically in Phoenix. These patterns disappear when you only look at average performance.
Temporal Slices
Break evaluation data into time-based segments:
- Day-of-week effects: weekday vs weekend behavior
- Seasonal patterns: quarterly or monthly performance
- Event windows: before/during/after holidays, sales events
- Deployment timeline: week 1 vs week 10 after launch
Geographic Slices
Partition by location attributes:
- Country/region/city: cultural and regulatory differences
- Urban vs rural: infrastructure and density effects
- Climate zones: environmental factors
- Market maturity: new vs established markets
Practical Application
Check metrics like precision, recall, and error rates separately for each slice. If your model's MAE is 2.0 overall but 5.0 in the Pacific Northwest and 1.2 in the Southeast, you've found actionable drift that retraining on regional data can fix.
Key Takeaway: Temporal and geographic slicing reveals distribution shifts masked by aggregate metrics, enabling targeted improvements where your model actually struggles in the real world.