Notes

Deep Feature Synthesis

Most real data does not arrive as one tidy table. It arrives as customers, their orders, and the items inside each order — and the modelling table you actually need, one row per customer with columns describing their behaviour, has to be built first. Deep Feature Synthesis automates that construction.

Primitives, stacked
DFS takes a set of tables plus the relationships between them, then applies small reusable operations called primitives:

  • Transform primitives work inside one table — the month of a timestamp, the hour of day, the time since the previous event.
  • Aggregation primitives cross a one-to-many relationship — SUM, MEAN, COUNT, MAX or NUM_UNIQUE over a child table's rows for each parent row.

Reading the output
Stacking primitives to a chosen depth produces features whose names read as the calculation itself: MEAN(orders.total), or MAX(orders.MEAN(items.price)) one level deeper. The "deep" in the name refers to that stacking depth, not to neural networks.

Why it matters
DFS, introduced by Kanter and Veeramachaneni in 2015 and implemented in Featuretools, turns the most judgement-heavy and least reproducible part of a project into a function call: one dfs() run generates hundreds of candidate columns, and feature selection decides which survive. Just as important, it accepts a cutoff time per row and computes each feature only from data available before the moment being predicted — the discipline that stops a model learning from the future, scoring beautifully in validation and failing in production.

Deep Feature Synthesis (DFS) is an algorithm that builds a modelling table automatically from related tables. It applies transform primitives within a table and aggregation primitives across one-to-many relationships, stacking them to a chosen depth to generate named features such as MEAN(orders.total). Implemented in Featuretools, it replaces hand-crafted feature engineering on relational data with a reproducible call, and its per-row cutoff times keep every feature free of information from after the prediction point.

Suppose you want to predict which shoppers will come back. Your records are scattered: one list of shoppers, another of their orders, another of the items in each order. Before any prediction is possible you need one tidy row per shopper — how much they have spent, how many orders they have placed, how long since the last one. Deep Feature Synthesis writes those summaries for you, automatically, by walking the links between the lists and adding things up. It can even build summaries of summaries. The word deep here simply means how many layers of summarising it does — nothing to do with brain-like networks.