Random Versus Time-Based Splits for a Marketplace Price Model

Last updated: November 29, 2026

Quick Overview

A model predicting whether a Facebook Marketplace listing sells within 7 days scores much better on a random split than after launch. Explain the likely cause and design a validation scheme that matches production.

Meta
Machine Learning
Data Scientist
Meta
November 29, 2026
Data Scientist
Technical Screen
Machine Learning
Medium

0

0

0 solved


A model predicting whether a Facebook Marketplace listing sells within 7 days scores much better on a random split than after launch. Explain the likely cause and design a validation scheme that matches production.

Marketplace data is temporal: prices, seasonality and seller behavior shift, and the same sellers relist items. The interviewer wants you to identify leakage from random splits and design time-aware, group-aware validation.

What the Interviewer Expects
  • Identify temporal leakage and seller or item duplication across folds
  • Propose a forward-chaining time split with a gap for label maturity
  • Group by seller or relisted item to avoid near-duplicates leaking
  • Explain why the label window requires a gap between train and test
  • Choose metrics and slices that reflect launch conditions
Key Topics to Cover
Temporal leakage
Time-based validation
Group k-fold
Label maturity
Distribution shift
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How large should the gap between train and validation be here?
  • How would you tune hyperparameters with a rolling-origin scheme?
  • What if the product launches in a new country with no history?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

I would ask when features are computed relative to listing time, how the label is defined (sold within 7 days of posting), whether sellers relist the same item, and how far into the future the model w...

Approach

A random split puts listings from the same week, often from the same seller and even the same relisted item, into both train and test. The model learns seller identity and week-specific demand that ar...


Submit Your Answer
Markdown supported