Build a predictive model from TurboTax sample data
IntuitData Scientist · OnsiteLast updated
This problem tests your ability to design an end-to-end predictive modeling pipeline for tax-related data, focusing on feature engineering, handling imbalanced datasets, and selecting appropriate evaluation metrics.
Scenario
You are tasked with building a machine learning model to predict whether a TurboTax user will require an 'Itemized Deduction' versus a 'Standard Deduction' based on their financial profile (e.g., income sources, mortgage interest, charitable donations, state/local taxes).
Objective
Describe the design of a classification model for this task. Your answer should address the following:
- Data Preprocessing: How would you handle categorical features (like state of residence) and missing values (e.g., users who skip optional financial fields)?
- Feature Engineering: What specific features or transformations might be predictive of a user choosing to itemize?
- Evaluation: Given that most taxpayers take the standard deduction, the dataset is likely imbalanced. Which metrics would you prioritize to evaluate model performance, and why?
- Validation: Describe a validation strategy that respects the temporal nature of tax filing seasons.
Constraints
- Assume the dataset contains 1 million records.
- The model needs to be interpretable to satisfy compliance requirements.
- High recall for identifying potential itemizers is prioritized to ensure users do not overpay taxes.
Hints
Hint 1
Consider how the standard deduction threshold relative to a user's total expenses acts as a logical 'gate' for the target variable.
Hint 2
For interpretability, compare the trade-offs between using a Logistic Regression model with polynomial features versus a constrained Tree-based model.
Hint 3
Think about 'look-ahead bias' when partitioning data; if you train on tax laws from 2023, can you reliably predict filings from 2022?
Follow-up questions
- How would you handle 'concept drift' if federal tax laws (e.g., the standard deduction amount) change significantly year-over-year?
- If the model produces a false negative (predicting standard when itemized is better), how does this impact the user's financial outcome and the company's product reputation?
- How would you integrate this model into a real-time production environment while maintaining low latency?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.