KatInterview

Unreliable Engagement Counter in a Filing-Completion Model

Machine LearningModel answer
MediumModel answerMachine Learningfeature-engineeringmissing-datadata-leakage

Last updated

Diagnose a cumulative usage feature with many zeros and nulls, handle its absence at scoring time, and explain why it correlates negatively with completing a tax return.

Context

Your team is building a classifier that predicts whether a user will complete their tax return in a consumer tax-filing product. The binary label is success.

One feature looks very strong in offline experiments:

  • session_count: the cumulative number of sessions the user has had in the product.

You notice three problems:

  1. In the training table, session_count is 0 for a large share of rows and missing for another large share.
  2. Engineering says the field is not available when the model needs to score a user, even though it exists in the schema.
  3. In exploratory analysis, session_count is negatively correlated with success, which surprises the team.

You have access, in principle, to raw product event logs (page views, step completions, timestamps), but instrumentation is known to be imperfect.

What to answer

  1. Zeros and missing values. How would you find out why session_count is so often 0 or missing, and how would you handle each case when modeling?
  2. Feature unavailable at scoring time. What are your options? How do you choose between (a) dropping the feature, (b) building a proxy that can be computed at scoring time, and (c) changing when the prediction is made or how the problem is defined?
  3. Negative correlation. Give at least two plausible explanations, including one that takes the opposite view of the obvious story. For each, say what extra data or analysis would confirm or reject it.

Your answer should explicitly address leakage risk, feature availability, and how you would explain the trade-offs to non-technical stakeholders.

Hints

Hint 1

A 0 and a NULL are not the same thing. Ask what upstream process produces each one, then slice both by platform, app version, date, and identity type to look for patterns.

Hint 2

A cumulative count only makes sense relative to a point in time. Ask when it was snapshotted compared with the moment you would actually make the prediction, and whether it includes sessions after the user finished filing.

Hint 3

To decide between dropping, proxying, or retiming, compare three models on a time-based split: no feature, an as-of-time version, and the raw cumulative version used only as a leakage check. For the negative correlation, consider both 'struggling users return more' and 'finishers stop returning'.