Validate a Home Price Model Without Leaking Future Sales

Last updated: November 29, 2026

Quick Overview

A teammate reports that their new home price model cuts median absolute percent error from 7% to 3% using a random 80/20 split of five years of sales. Explain what could be wrong and how you would set up a trustworthy evaluation.

Zillow
Machine Learning
Machine Learning Engineer
Zillow
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Medium

0

0

0 solved


A teammate reports that their new home price model cuts median absolute percent error from 7% to 3% using a random 80/20 split of five years of sales. Explain what could be wrong and how you would set up a trustworthy evaluation.

Valuation models like the Zestimate are judged on how well they price homes before they sell, so temporal and spatial leakage is the most common reason an offline win disappears in production. The interviewer is checking that you spot leakage paths specific to housing data and can design a backtest that matches how the model is used.

What the Interviewer Expects
  • Identify temporal leakage from a random split across five years
  • Spot target leakage through comparable-sales features and repeat sales of the same home
  • Propose a rolling-origin backtest with point-in-time features
  • Use a home-grouped split so the same property is not in train and test
  • Report MdAPE and coverage by segment, not one global number
Key Topics to Cover
data leakage
time-based validation
group k-fold
MdAPE
backtesting
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 would you evaluate off-market homes that never sell during the test window?
  • The listing price is available for on-market homes. Should it be a feature?
  • How would you estimate whether the improvement will hold during a sharp market downturn?
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

Labels are sale prices with sale dates. Features likely include home attributes, prior sale prices, neighborhood aggregates and maybe the list price. The model in production predicts today's value for...

Approach

Look for three leaks. Temporal: a random split lets the model learn 2025 market levels from 2025 sales and test on other 2025 sales, while production always predicts forward. Target: a 'median price p...


Submit Your Answer
Markdown supported

Related Questions