liveBook · Manning

Feature engineering

As explained in Effective Data Analysis

Feature engineering is the creation or transformation of variables from existing data to better represent processes relevant to a model.

Feature engineering creates or transforms variables so a dataset better represents the processes relevant to a model. It combines domain knowledge, mathematical insight, and analytical intuition with exploratory analysis. section 9.2.1 section 9.4

Common techniques include:

  • Extract components from existing columns, such as month numbers or day-of-week values from dates. section 9.2.1 section 9.4
  • Encode categories as binary or dummy variables so categorical patterns can enter a model. section 9.2.1
  • Transform numerical variables with operations such as square roots or squares when relationships or model assumptions call for them. section 9.2.1 section 9.4
  • Combine datasets and aggregate observations at a useful grain, such as daily complaint counts joined with weather measurements. section 9.2.1

Forecasting rat complaints

A city dataset aggregates rat sightings by day and combines them with daily temperature and other weather measures. Month, weekday, and transformed wind-speed variables then represent seasonality, weekly patterns, and nonlinear relationships relevant to staffing forecasts. section 9.2.1 section 9.4

Figure 9.19 Preview of the combined rats and weather dataset
figure

Preview the combined rats-and-weather dataset used to connect engineered predictors with an operational forecasting question. section 9.2.1

How Effective Data Analysis covers it

How deep it goes
Explains aggregation, extraction, encoding, and numerical transformation with examples, while stopping short of detailed algorithmic internals.
Examples
Uses rat-sighting counts, weather variables, date components, weekday indicators, dummy coding, boxplots, correlations, and wind-speed transformations.
What it assumes
Assumes basic data preparation and modeling context while developing domain knowledge, mathematical insight, and analytical intuition through examples.
What you can do after
Build it from scratch by deriving, transforming, encoding, and combining variables for explanatory or predictive modeling.
How it connects
Connects feature engineering with exploratory analysis, model assumptions, predictors, residuals, explanatory models, and predictive models.

Also explained in

Compare how 16 books explain feature engineering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.