Creating features with aggregation primitives
Throughout this chapter, we’ve created features automatically by mapping existing variables into new features through various functions. For example, we extracted date and time parts from datetime variables, counted the number of words, characters, and punctuation in texts, combined numerical features into new variables, and transformed features with functions such as sine and cosine. To create these features, we worked with transform primitives.
The featuretools
library also supports aggregation primitives, and here is where it gets interesting. These primitives take related observations as input and return a single value as output. For example, if we have a numerical variable, price
, related to an invoice, an aggregation primitive would take all the price observations for a single invoice and return a single value, such as the mean price or the sum (that is, the total amount paid), for that invoice.
Note
The featuretools...