---
title: Clustering
description: 'Grouping examples without predefined class labels according to a chosen representation, similarity measure, and clustering objective.'
canonical_url: 'https://darkfactory.dev/glossary/clustering'
markdown_url: 'https://darkfactory.dev/glossary/clustering.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Clustering


## Definition

Clustering groups examples without predefined class labels according to a chosen representation, similarity measure, and clustering objective. The result may be a hard assignment in which each example belongs to one group, a soft assignment with membership weights, or a hierarchy of nested groups.

A clustering algorithm does not simply discover the one true structure already present in the data. The features, distance function, normalization, requested number of groups, density assumptions, initialization, and treatment of outliers all shape the result. Two reasonable methods can produce different groupings from the same records because they define similarity differently.

## What makes a cluster useful

Internal separation is not enough. A useful clustering should be stable enough to reproduce, interpretable for its intended users, and connected to a decision or investigation. A segmentation that changes radically with a small sample update may be a poor basis for policy even if its optimization score is high.

## Distinguish it from nearby terms

- **Classification** assigns predefined labels learned or encoded in advance. Clustering produces groups whose meaning still needs interpretation.
- **Dimensionality reduction** compresses a representation. It can make clusters easier to visualize, but visible separation after projection may not reflect separation in the original space.
- **Nearest-neighbor retrieval** finds similar examples for a query. It does not require partitioning the whole dataset into groups.
- **Topic modeling** estimates latent themes in documents and may give one document several topic proportions rather than one cluster.

## Operational significance

Do not attach business meaning to a cluster from a few prominent examples. Inspect membership across the group, compare alternative representations and algorithms, test stability, and check whether downstream treatment creates unfair or unsafe effects.

## Check your understanding

A customer analysis produces six segments. Before naming them, ask what features and distance measure created them, whether another seed or sample preserves them, and what decision becomes better because those groups exist.

## Related terms

- [Classification](https://darkfactory.dev/glossary/classification)
- [Embedding](https://darkfactory.dev/glossary/embedding)

## Evidence and further reading

- [NIST AI Resource Center Glossary](https://airc.nist.gov/glossary/)
- [Google Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)
