liveBook · Manning

Feature engineering

As explained in Fight Fraud with Machine Learning

Feature engineering is the process of manually extracting or constructing input variables from raw data for a machine-learning system.

Feature engineering manually extracts or constructs input variables from raw data so a machine-learning model can learn relationships between those variables and an outcome. In fraud detection, extracted email attributes such as sender ID, body length, attachment count, spelling mistakes, and subject presence can support binary fraud classification. section 1.3

A practical feature-engineering workflow includes:

  • Inspect existing numerical and non-numerical data, derive additional variables, and add them to the dataset. section 3.6
  • Check whether new variables duplicate existing information by examining their correlation with existing features. section 3.6
  • Evaluate the trained model's feature importance to see whether engineered variables contribute to its decisions. section 3.7.4

Fraud-dataset augmentation

A tabular fraud dataset can be expanded with amountOrig and errorBalanceDest. Both appear among the five most important variables in a trained random forest, demonstrating how constructed features can influence model behavior and deployment decisions. section 3.6 section 3.7.4

Figure 1.10 Demonstration of an email phishing fraud detection machine learning model. The feature engineering block extracts features/attributes from input data The ML model learns from labeled data (extracted features and corresponding fraud or not-fraud labels). The trained ML model is then used to predict whether a new email is fraudulent or not.

Trace the phishing-detection pipeline from raw email through manually extracted attributes and labeled training data to fraud or not-fraud prediction. section 1.3

Classical machine learning depends on explicit features and is well suited to predefined tabular columns. Deep learning can learn hierarchical features directly from raw images, text, audio, video, or graphs, reducing manual extraction and development overhead. section 1.4 section 4.2.1

How Fight Fraud with Machine Learning covers it

How deep it goes
Explains manual extraction, dataset augmentation, correlation checks, and feature-importance interpretation, while deferring detailed implementation code.
Examples
Uses phishing-email attributes, engineered fraud variables such as amountOrig and errorBalanceDest, and random-forest importance plots.
What it assumes
Assumes raw records and a machine-learning target, while teaching explicit feature extraction from email and tabular fraud data.
What you can do after
Builds explicit tabular inputs, checks their redundancy, and interprets their contribution to a trained fraud model.
How it connects
Connects feature engineering with classical machine learning, binary classification, random forests, feature importance, and deep learning.

Also explained in

Compare how 24 books explain feature engineering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.