liveBook · Manning

Feature engineering

As explained in Deep Learning with R, Third Edition

Feature engineering is the manual design or transformation of input features into representations suitable for machine learning.

Feature engineering means using knowledge of the data and the learning algorithm to transform inputs before they reach a model. These transformations are hardcoded, not learned. The aim is to express the problem in a form that makes useful patterns easier to find. section 5.4.2

Reading a clock

Imagine predicting the time from a photograph of a clock. Raw pixels make this a demanding image-learning problem. Instead, a short R script could locate the tips of the hands and supply their (x, y) coordinates. A simple model could then associate those coordinates with times. Convert the coordinates to angles around the clock’s center, and even that model may be unnecessary: rounding and a lookup can recover the approximate time. section 5.4.2

Figure 5.17 Feature engineering for reading the time on a clock
figure

The clock diagram shows how changing the input representation can simplify the prediction task. section 5.4.2

When developing a model:

  • Filter out uninformative inputs through feature selection, then use problem knowledge to create promising new features. section 6.2.3
  • Consider the features alongside the model architecture. A suitable representation helps direct learning toward useful solutions; a model may fail to find a simple solution even when it can represent one. section 13.2.3
  • Keep data quality in view. Informative, less noisy features make the input space better structured and support generalization. section 5.1.2

Deep learning learns many representations that once had to be designed by hand, but this does not make input quality irrelevant. Nor is manual feature engineering the same as feature extraction from a pretrained model: that technique reuses representations the model has already learned. section 1.7 section 8.3.1

How Deep Learning with R, Third Edition covers it

How deep it goes
Defines hardcoded input transformations, works through a clock example, and gives workflow guidance without a general transformation recipe.
Examples
Uses clock-hand coordinates and angles to show how progressively better inputs simplify time prediction.
What it assumes
Introduces the idea through a familiar clock without requiring an account of neural-network internals.
What you can do after
Practice/perform feature selection and design non-learned input transformations using knowledge of the problem.
How it connects
Connects feature selection and generalization with architecture priors, learned representations, and pretrained feature extraction.

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 Deep Learning with R, Third Edition. The section links point to the parts of the book it draws on.