← Thumbtack Interview Insights

Thumbtack·Data Scientist·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

Thumbtack data scientist interview that went deep on model evaluation and statistical fundamentals. The technical questions were genuinely hard and required connecting theory to practical constraints like temporal data and class imbalance.

Questions Asked (3)

Q1

Walk through the main cross-validation strategies (k-fold, stratified k-fold, leave-one-out, nested CV, time-series rolling and blocked CV) and explain when you'd use each one.

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

I actually felt okay on this until they pushed on nested CV.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first grouping the strategies into two families: those for i.i.d. data (k-fold, stratified, LOO, nested) and those for temporal data (rolling, blocked). For each strategy, briefly explain how it works, then focus on the key trade-off (bias-variance, computational cost, or data leakage) that determines when to use it, tying your choices back to Thumbtack's marketplace context.

Pro tip: Emphasize that the choice of cross-validation should mirror the real-world deployment scenario—for example, if you're predicting future bookings, time-series CV is non-negotiable because random k-fold would leak future information. Also mention that nested CV is the gold standard for unbiased performance estimation when hyperparameter tuning is involved, but it's often overkill for quick experiments.

1. Categorize by data structure

Start by distinguishing between i.i.d. data and time-dependent data, as this determines the valid cross-validation strategies. Mention that using random splits on temporal data causes leakage.

2. Explain i.i.d. strategies and their trade-offs

Cover k-fold (general purpose), stratified k-fold (preserves class balance for imbalanced classification), leave-one-out (low bias, high variance, computationally expensive), and nested CV (unbiased evaluation with hyperparameter tuning).

3. Explain time-series strategies and when to use them

Describe rolling (expanding window) CV for growing training sets and blocked CV for fixed-size windows, both respecting temporal order. Use these when data has a time component, like user activity or bookings.

4. Connect to business context and trade-offs

Relate each strategy to Thumbtack's use cases: e.g., stratified k-fold for predicting pros who will respond, rolling CV for forecasting demand, and nested CV for model selection in A/B testing. Highlight computational and bias-variance trade-offs.

Key Points to Mention

  • Bias-variance trade-off: LOO has low bias but high variance; k-fold with k=5 or 10 balances both.
  • Stratified k-fold ensures each fold has the same class distribution, crucial for imbalanced datasets like fraud detection or rare event prediction.
  • Nested CV separates hyperparameter tuning (inner loop) from performance estimation (outer loop) to avoid optimistic bias.
  • Time-series CV must respect temporal order; rolling CV uses expanding training windows, while blocked CV uses sliding windows of fixed size.
  • Data leakage: random k-fold on time-series data leaks future information, leading to overly optimistic performance estimates.
  • Computational cost: LOO and nested CV are expensive; for large datasets, k-fold or stratified k-fold are more practical.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

You have a dataset with temporal ordering and class imbalance. Design an evaluation framework that avoids data leakage while still giving stable performance estimates. Justify your fold construction and your choice of metrics.

A/B Testing & ExperimentationTechnical Trade-offsProduct Analytics & Metrics
Author's notes

This is where it got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the dual challenge: temporal ordering requires time-aware validation to prevent leakage, while class imbalance demands metrics that are robust to skewed distributions. Propose a rolling-origin or purged time-series cross-validation scheme with stratification on the target, and justify metric choices like PR-AUC, recall at fixed precision, or cost-sensitive measures over accuracy.

Pro tip: Emphasize that in production, the model will predict future unseen data, so your validation must mimic that temporal gap—use a gap between train and validation folds to simulate real deployment latency. Also, consider that class imbalance may shift over time, so monitor metric stability across folds.

1. Define the temporal structure and leakage risks

Identify the time column and any features that could leak future information (e.g., aggregates over future windows). Establish that random shuffling is invalid because it breaks temporal order and leaks future data into training.

2. Choose a time-aware validation scheme

Use rolling-origin cross-validation (expanding or sliding window) with a gap between train and validation sets to mimic real deployment. For each fold, train on past data and validate on a future period, ensuring no overlap.

3. Address class imbalance within folds

Apply stratification on the target within each temporal fold to maintain similar class ratios, or use techniques like oversampling only on training folds (never on validation). Consider that imbalance may vary over time, so check per-fold class distribution.

4. Select appropriate evaluation metrics

Choose metrics robust to imbalance: PR-AUC (average precision), recall at fixed precision, F-beta, or cost-sensitive measures. Avoid accuracy and ROC-AUC if the positive class is rare. Report mean and standard deviation across folds for stability.

5. Validate stability and justify choices

Assess metric variability across folds; if high, consider more folds or a different window size. Justify why your fold construction and metrics align with the business problem (e.g., minimizing false negatives in fraud detection).

Key Points to Mention

  • Temporal ordering: use time-based splits, never random shuffling, to prevent data leakage.
  • Purged/embargoed cross-validation: remove training samples near validation boundaries to avoid leakage from autocorrelation.
  • Class imbalance: use stratification within temporal folds, and apply resampling only on training data.
  • Metrics: prefer PR-AUC, recall at fixed precision, or F-beta over accuracy/ROC-AUC for imbalanced data.
  • Stability: report mean and standard deviation of metrics across folds; consider multiple random seeds if applicable.
  • Business alignment: tie metric choice to the cost of false positives vs. false negatives in the product context.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Explain the bias-variance tradeoff quantitatively. How do model complexity, training set size, and regularization each affect bias and variance? What do CV error curves tell you about underfitting vs overfitting, and what levers do you pull depending on which problem you have?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Long question, felt like three questions stitched together.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the bias-variance decomposition quantitatively, then explain how model complexity, training set size, and regularization shift bias and variance. Use cross-validation error curves to diagnose underfitting vs overfitting, and conclude with specific levers to pull for each scenario.

Pro tip: Tie the tradeoff to business impact: e.g., in a marketplace like Thumbtack, high bias might mean missing nuanced provider matches, while high variance could cause erratic pricing—so the right fix depends on which error hurts the user experience more.

1. Define the decomposition

State the expected test error decomposition: Bias^2 + Variance + Irreducible Error. Explain that bias is error from erroneous assumptions (e.g., linear model on nonlinear data) and variance is sensitivity to training set fluctuations.

2. Explain the effects of complexity, data size, and regularization

As model complexity increases, bias decreases but variance increases. Increasing training set size reduces variance without affecting bias. Regularization (L1/L2, dropout) increases bias but reduces variance by constraining the model.

3. Interpret CV error curves

Plot training and validation error vs. complexity (or training size). High bias (underfitting): both errors high and close. High variance (overfitting): training error low, validation error high with a large gap.

4. Prescribe levers for each problem

For high bias: increase model complexity, add features, reduce regularization. For high variance: get more data, simplify model, add regularization, use bagging/early stopping.

Key Points to Mention

  • Bias-variance decomposition formula: E[(y - f_hat(x))^2] = Bias^2 + Variance + Irreducible Error
  • Model complexity: bias decreases, variance increases (U-shaped test error)
  • Training set size: variance decreases as n grows, bias roughly constant
  • Regularization: increases bias, decreases variance (e.g., L2 shrinks weights)
  • CV error curves: underfitting = high training & validation error; overfitting = low training, high validation error
  • Levers: for underfitting, increase complexity/features; for overfitting, more data/regularization/simpler model

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.