What is unsupervised learning? Explained with everyday examples

Most of the world's data has no labels. Unsupervised learning finds patterns in it anyway, such as groups of similar customers or unusual transactions. Here is how it works, the main techniques, and its limits.

On the left, a jumble of unlabelled dots of the same grey colour. An arrow labelled unsupervised learning points right, where the dots have been sorted into three coloured groups: weekend shoppers, bargain hunters and big monthly spenders, plus one red dot far from the others marked unusual. A note says the group names are added by people afterwards.
Fig. 1 — Unsupervised learning finds groups and oddities in data with no labels. People then decide what the groups mean.

Tip a big box of mixed buttons onto a table and ask a child to sort them. Nobody tells them the categories. They might group by colour, or size, or number of holes. They find a structure that makes sense, without being given any answers.

Unsupervised learning gives computers that same job. The model gets data with no labels and no right answers, and it finds patterns on its own: groups of similar things, unusual items, or simpler ways to describe the data. This guide explains how unsupervised learning works, the main techniques, real examples, and its limits.

What is unsupervised learning?

Unsupervised learning is a type of machine learning where a model looks for patterns, groups or structure in data that has no labels.

Compare it with supervised learning:

Supervised learning Unsupervised learning
Training data Inputs with the right answers Inputs without answers
Goal Predict a known kind of answer Discover structure you didn’t define
Example “Is this email spam?” “What kinds of customers do we have?”
Judging success Compare with the right answers Harder: does the pattern make sense and help?

Unlabelled data is everywhere: website clicks, sales records, sensor readings, photos, documents. Labelling it is slow and expensive, so being able to learn from it directly is very useful.

The main kinds of unsupervised learning

1. Clustering: finding groups

Clustering puts similar items together into groups, called clusters.

A popular method is k-means. You choose how many groups you want (that’s the “k”). The algorithm places that many centre points, assigns each item to the nearest centre, moves each centre to the middle of its group, and repeats until the groups stop changing.

Three panels showing k-means with k equals 3. Step 1: grey dots with three star-shaped centres placed at random. Step 2: each dot is coloured by its nearest centre. Step 3: the centres have moved to the middle of their coloured groups, and the groups are now clean and separate. Arrows between panels say repeat until nothing changes.
k-means clustering: assign each point to its nearest centre, move the centres, repeat. (Illustrative.)

Examples:

  • Customer segments: an online shop groups customers by how they buy, and finds “weekend shoppers”, “bargain hunters” and “big monthly spenders”.
  • Grouping documents by topic, such as sorting thousands of support tickets into themes.
  • Organising photos of the same person or place together.

2. Anomaly detection: finding the odd one out

The model learns what “normal” looks like and flags things that don’t fit.

  • A bank spots a card payment that’s unusual for that customer: a new country, a strange time, an odd amount. (In practice, banks often combine this with supervised models trained on past fraud.)
  • A factory notices a machine’s vibration pattern drifting away from normal before it breaks.
  • IT teams spot unusual login activity that might be an attack.

3. Dimensionality reduction: simplifying the data

Real data can have hundreds of measurements per item. Dimensionality reduction finds a smaller number of combined measurements that keep most of the important information. A classic method is PCA (principal component analysis).

It’s used to visualise complex data on a simple 2D chart, to compress data, and to speed up other models. Squashing embeddings onto a flat “map of meaning” is an example.

4. Association rules: finding things that go together

This finds items that often appear together, a technique famously used for market basket analysis: customers who buy bread and eggs often also buy milk. Shops use it for product placement and “frequently bought together” suggestions.

A worked example: customer groups

A small online clothing shop has data on 10,000 customers: how often they buy, how much they spend, what time they shop, and whether they wait for sales. No labels.

  1. The data is cleaned and scaled so no single measurement dominates.
  2. A clustering algorithm groups the customers into, say, four clusters.
  3. The team looks at each cluster: one buys often but only during sales; another buys rarely but spends a lot.
  4. People name the groups and decide what to do: early sale alerts for the first group, new-arrival previews for the second.

Notice step 4. The algorithm finds the groups; people interpret what they mean.

Unsupervised learning in modern AI

  • Embeddings and recommendations often rely on finding similarity without labels.
  • Large language models learn mainly through self-supervised learning, a close cousin: the data supplies its own answers (the next word in a sentence), so no human labels are needed. It’s sometimes described as a kind of unsupervised learning.
  • Unsupervised steps are often used before supervised learning, to explore data, clean it, or find useful features.

The limits of unsupervised learning

  • Groups aren’t automatically meaningful. An algorithm will always find some clusters, even in random data. People have to check they make sense.
  • Results depend on choices. How many clusters, which measurements, how data is scaled: different choices give different groups.
  • Hard to judge. There’s no answer key, so success is measured by usefulness, not a simple score.
  • Bias still applies. If the data reflects unfair patterns, the groups can too (see AI bias).
  • “Unusual” isn’t the same as “bad”. An anomaly might be fraud, or just a customer on holiday.

Common misconceptions

“Unsupervised learning means no humans are involved.” People choose the data, the method and the settings, and interpret the results.

“The AI understands the groups it found.” It finds items that are mathematically similar. Naming and explaining the groups is a human job.

“Unsupervised learning is less useful than supervised learning.” They do different jobs. Exploring, grouping and spotting anomalies are exactly where unsupervised methods shine.

Key takeaways

  • Unsupervised learning finds patterns in data without labels.
  • Main techniques: clustering (k-means), anomaly detection, dimensionality reduction (PCA) and association rules.
  • Everyday uses: customer segments, fraud alerts, topic grouping, “frequently bought together”.
  • People still choose the setup and interpret what the patterns mean.
  • LLMs rely on a close cousin, self-supervised learning.

Frequently asked questions

What is unsupervised learning in simple words?

It’s when a computer looks at data with no right answers attached and finds patterns on its own, such as groups of similar items or unusual ones.

What is an example of unsupervised learning?

Grouping customers by their shopping habits without telling the computer what the groups should be. A shop might discover “bargain hunters” and “big monthly spenders” this way.

What is clustering?

Clustering is putting similar items into groups. k-means is a common method: pick a number of groups, then repeatedly assign items to the nearest group centre and update the centres.

What is the difference between supervised and unsupervised learning?

Supervised learning learns from examples with the right answers and predicts those answers for new data. Unsupervised learning has no answers and discovers structure in the data by itself.

Is ChatGPT trained with unsupervised learning?

Its base model was trained mainly with self-supervised learning, where the text provides its own answers (the next word). That’s closely related to unsupervised learning. It was then fine-tuned with supervised examples and human feedback.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.