What predictive value do group-by aggregate features provide over raw transaction records?

Quick Overview

Asks what group-by aggregate features such as per-user counts, means and rolling windows add to a model that sees raw transaction records. Tests feature engineering for fraud and churn models, point-in-time correctness, and training/serving consistency.

What predictive value do group-by aggregate features provide over raw transaction records?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What predictive value do group-by aggregate features provide over raw transaction records? Think of per-transaction fraud scoring or per-user churn scoring, with features grouped by user or merchant. ```hint What one row cannot say Ask what a single transaction row cannot tell a model about the entity it belongs to, and what a summary of that entity's history adds. ``` ```hint Watch the clock Consider which rows are allowed into an aggregate when the model makes a prediction at a given timestamp. ``` ### What a Strong Answer Covers - How aggregates handle entities with very different history lengths. - What per-entity summaries let a model compare a new event against, with a concrete example. - What aggregates over time windows add. - What group statistics do for noisy single events and for high-cardinality keys. - The main pitfalls when computing these features for training and serving. ### Follow-up Questions - How would you serve a "transactions in the last hour" feature with low latency at prediction time? - A merchant has only two transactions. How would you set its fraud-rate feature? - How would you check that your offline aggregates contain no future information? - When could a sequence model over raw transactions beat hand-built aggregates?

Overview: Asks what group-by aggregate features such as per-user counts, means and rolling windows add to a model that sees raw transaction records. Tests feature engineering for fraud and churn models, point-in-time correctness, and training/serving consistency.

PracHub logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What predictive value do group-by aggregate features provide over raw transaction records? Think of per-transaction fraud scoring or per-user churn scoring, with features grouped by user or merchant.

What a Strong Answer Covers Guidance

  • How aggregates handle entities with very different history lengths.
  • What per-entity summaries let a model compare a new event against, with a concrete example.
  • What aggregates over time windows add.
  • What group statistics do for noisy single events and for high-cardinality keys.
  • The main pitfalls when computing these features for training and serving.

Follow-up Questions Guidance

  • How would you serve a "transactions in the last hour" feature with low latency at prediction time?
  • A merchant has only two transactions. How would you set its fraud-rate feature?
  • How would you check that your offline aggregates contain no future information?
  • When could a sequence model over raw transactions beat hand-built aggregates?