# Feature engineering

> Canonical: https://skillalmanac.com/glossary/feature-engineering | Last verified: 2026-11-25 | Index status: index-eligible

Feature engineering is the process of turning raw data into features, the input columns a machine learning model learns from, by transforming, combining, encoding, scaling or selecting them.

Also called: feature engineering machine learning, features in machine learning, feature selection, feature creation, feature transformation.

## In plain language

A model cannot read a spreadsheet the way you do. It needs numbers that describe each example, called features. Feature engineering is the work of making those numbers: turning a date into day of the week, turning a column of country names into yes or no columns, or putting values on a similar scale. It is like preparing ingredients before cooking; the recipe matters, but so does how the ingredients are cut. The risk is that a feature built from information you will not have at prediction time can make testing look better than deployment performance. Good features also take time to build and check.

## Technical definition

IBM defines feature engineering as the process of transforming raw data into relevant information for use by machine learning models, and lists techniques such as imputation for missing values, one-hot encoding of categorical features, feature scaling and feature selection. The scikit-learn user guide says its preprocessing package changes raw feature vectors into a representation more suitable for downstream estimators, with transformers such as StandardScaler and OneHotEncoder that can sit in a Pipeline so scaling is fitted on training data only. Its feature selection module can be used to improve estimators' accuracy scores or to boost performance on very high-dimensional datasets.

## How it shows up when you use agents

When you ask Claude Code, Codex or Cursor to build a predictive model from a CSV, a large share of what the agent writes is feature engineering: filling missing values, encoding text columns, scaling numbers, dropping columns. In a library such as [scikit-learn](/glossary/scikit-learn) these steps are transformers that can be chained into a pipeline.

What breaks when this is misunderstood is often leakage. If a column is computed from the answer, or if scaling is fitted on all rows before the split, the evaluation can become optimistic or misleading. Leakage is a flaw in what information is available during fitting or evaluation; it is distinct from [overfitting](/glossary/overfitting), though both can undermine assessment.

The safer habit is to ask the agent to list every feature it created, say what raw column each came from, and confirm that transformations were fitted on training rows only. Run the leakage check on the splits. The catalogue has no skills for building features, so the skills on this page help with the data around them. In [supervised learning](/glossary/supervised-learning), the quality of the features often decides how much a model can learn from its [training data](/glossary/training-data).

## Common confusions

- **Feature engineering versus feature selection.** Engineering creates or transforms features. IBM describes selection as techniques for choosing a subset of the most relevant features, so selection is one part of the wider work.
- **Feature engineering versus embeddings.** Hand-built features are chosen by a person. An [embedding](/glossary/embedding) is a learned vector representation.
- **Feature versus label.** A feature is an input column. The label is the answer the model is trained to predict. Mixing them up is a cause of label leakage.
- **Myth.** More features do not guarantee a better model. Extra columns can add noise, and the scikit-learn guide offers feature selection to improve accuracy scores or speed on very high-dimensional data.

## Worked examples in this catalogue

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.

Why it exercises the concept: The catalogue has no feature-engineering skills, so this is a contrast case. Profiling a table before you build features shows which columns are empty, skewed or categorical, which decides what transformations they need.

### [csv-structure-validator](https://skillalmanac.com/skills/skill-almanac/csv-structure-validator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of a CSV file for ragged rows, blank or duplicate headers, and per-column rule failures such as bad ISO dates, duplicate IDs and out-of-range numbers.

Why it exercises the concept: Not a feature-engineering skill. Features built from malformed dates or duplicate IDs inherit the errors, so validating the raw columns comes first.

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A JSON report on train, validation and test files that flags duplicates, shared groups, time leakage and label leakage between the splits.

Why it exercises the concept: Not a feature-engineering skill. A feature that leaks the answer is a common feature-engineering mistake, and this skill checks the splits for label and time leakage.

### [mock-record-generator](https://skillalmanac.com/skills/skill-almanac/mock-record-generator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Seeded mock records as CSV or JSON from a JSON field list or a simple TypeScript interface.

Why it exercises the concept: Not a feature-engineering skill. Seeded fake records give you a small repeatable table to try a transformation on before you point it at real data.

## Related terms

- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Training data](https://skillalmanac.com/glossary/training-data.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)
- [Embedding](https://skillalmanac.com/glossary/embedding.md)
- [Data labeling](https://skillalmanac.com/glossary/data-labeling.md)

## Sources

- [What is feature engineering?](https://www.ibm.com/think/topics/feature-engineering), IBM (accessed 2026-11-24)
- [Preprocessing data](https://scikit-learn.org/stable/modules/preprocessing.html), scikit-learn user guide (accessed 2026-11-24)
- [Feature selection](https://scikit-learn.org/stable/modules/feature_selection.html), scikit-learn user guide (accessed 2026-11-24)
- [Common pitfalls: Data leakage](https://scikit-learn.org/stable/common_pitfalls.html#data-leakage), scikit-learn (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
