# Dimensionality reduction

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

Dimensionality reduction is a family of methods that represent a dataset with fewer features, called dimensions, while trying to keep the structure that matters, so the data is easier to store, visualize or feed to a model.

Also called: dimension reduction, dimensionality reduction techniques, dimensionality reduction machine learning, reduce dimensions.

## In plain language

Imagine a spreadsheet with hundreds of columns describing each customer. Many columns overlap or add little, and nobody can plot hundreds of columns on a page. Dimensionality reduction squeezes the table down to a handful of new columns that still capture much of the pattern, so you can draw it, speed up a model or spot groups. The cost is that something is lost: the new columns are summaries, so they can be harder to explain, and a method chosen for a picture may mislead if you read it as a measurement. IBM notes that models trained on very wide data often generalize poorly, which is one reason people reduce it.

## Technical definition

Dimensionality reduction maps data from a space with many features to one with fewer, either by selecting a subset of the original features or by building new ones. Linear methods such as principal component analysis project the data onto directions chosen to keep variance. Non-linear methods, often grouped as manifold learning, assume the data lies near a lower-dimensional curved surface; scikit-learn describes manifold learning as an approach to non-linear dimensionality reduction. t-SNE is a non-linear method whose main purpose, per scikit-learn, is visualization in two or three dimensions. Many of these methods are unsupervised: they learn structure from the data without labels.

## How it shows up when you use agents

Dimensionality reduction is a data-preparation and exploration technique, so you will not meet it while prompting Claude Code, Codex or Cursor about ordinary code. It appears when you ask an agent to explore a wide dataset or build a [machine learning](/glossary/machine-learning) pipeline: a two-dimensional scatter plot of rows, a compressed set of columns fed to a model, or a plot of text vectors called [embeddings](/glossary/embedding).

What breaks when it is misunderstood: people read a picture as a measurement. scikit-learn notes that t-SNE does not explicitly preserve global structure and that different random seeds can give different embeddings, so the distance between two clusters in the plot is not a reliable quantity. A failure to see separated groups in two dimensions also does not show that a model could not separate them.

Next actions. For an inductive reducer with an out-of-sample transform, fit on training data only and transform validation/test data with that fitted mapping. Scikit-learn t-SNE has no general transform for new samples, so treat its visualization separately. Review preprocessing code as well as the split-file signals from [split-leakage-check](/skills/skill-almanac/split-leakage-check). Start with the linear method in [Principal component analysis](/glossary/principal-component-analysis) before trying non-linear ones. Treat a reduced table as a summary of your data, not the data itself.

## Common confusions

- **Dimensionality reduction versus principal component analysis.** Dimensionality reduction is the goal and a family of methods. PCA is one linear method for it, with its own page. See [Principal component analysis](/glossary/principal-component-analysis).
- **Reduction versus feature selection.** Selection keeps some of the original columns. Methods such as PCA build new columns that combine the originals. See [Feature engineering](/glossary/feature-engineering).
- **Visualization versus modelling.** t-SNE is described by scikit-learn as mainly for visualization in two or three dimensions. Using its output as a general-purpose input to a model is a different decision that needs its own check.
- **Myth.** Fewer dimensions means a better model. Reduction discards information, so test whether the reduced data helps on held-out examples, which also guards against [overfitting](/glossary/overfitting).

## 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: Profiling a wide CSV is the step before you decide whether to reduce its columns. This inspected profiler is an adjacent data check, not a dimensionality-reduction implementation.

### [huggingface-datasets](https://skillalmanac.com/skills/huggingface/huggingface-datasets)

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

What you see: Reads Hugging Face datasets through the Dataset Viewer API: metadata, rows, search and filters.

Why it exercises the concept: Public datasets often come with many columns. Reading their metadata and rows shows how wide the data is before you reduce it. This skill reads data; it does not reduce it.

### [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 check of train, validation and test files for duplicates, shared groups, time and label leakage, printed as JSON.

Why it exercises the concept: A reduction step learned on all the data can leak information from the test set into training. This checker flags selected split-file signals, not the preprocessing fit history. It cannot detect every learned-preprocessing leak or certify a valid reduction pipeline.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

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

What you see: Claude Code's overview page describes it as an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.

Why it exercises the concept: A coding agent can write and run a short scikit-learn script that reduces a dataset to two columns, which is a quick way to try the idea on your own data.

## Related terms

- [Principal component analysis (PCA)](https://skillalmanac.com/glossary/principal-component-analysis.md)
- [Unsupervised learning](https://skillalmanac.com/glossary/unsupervised-learning.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Embedding](https://skillalmanac.com/glossary/embedding.md)
- [Feature engineering](https://skillalmanac.com/glossary/feature-engineering.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)

## Sources

- [What is dimensionality reduction?](https://www.ibm.com/think/topics/dimensionality-reduction), IBM (accessed 2026-11-24)
- [2.2. Manifold learning](https://scikit-learn.org/stable/modules/manifold.html), scikit-learn (accessed 2026-11-24)
- [2.5. Decomposing signals in components (matrix factorization problems)](https://scikit-learn.org/stable/modules/decomposition.html), scikit-learn (accessed 2026-11-24)
- [TSNE: fit and fit_transform methods](https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html), 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).
