Unsupervised learning is a type of machine learning that finds patterns and structure in data without labelled answers. Instead of learning to predict a known target, the model explores the data on its own to discover groups, unusual items or simpler ways to represent it. It is useful when you do not know exactly what you are looking for.
Key takeaways
- Unsupervised learning uses unlabelled data.
- Its main techniques are clustering, dimensionality reduction, anomaly detection and association rules.
- It is often used for exploration and as a first step before supervised learning.
- Results are harder to evaluate because there is no correct answer to compare with.
Unsupervised learning explained in simple terms
Tip a box of mixed buttons onto a table and ask someone to organise them, with no instructions. They might group by colour, size or number of holes. Nobody told them the categories; they found them. Unsupervised learning does the same with data. It notices which items are similar and which stand out, without being told what to look for.
How does unsupervised learning work?
- Collect data without labels, such as customer transactions or sensor readings.
- Prepare features: scale values so no single feature dominates, and remove noise.
- Choose a technique that fits the goal: grouping, simplifying or spotting outliers.
- Run the algorithm, which measures similarity or density between data points.
- Interpret results with domain experts. The algorithm finds groups; people decide what they mean.
Main types of unsupervised learning
| Technique | What it does | Common algorithms | Example |
|---|---|---|---|
| Clustering | Groups similar items | k-means, DBSCAN, hierarchical clustering | Customer segments |
| Dimensionality reduction | Compresses many features into fewer | PCA, t-SNE, UMAP, autoencoders | Visualising complex data |
| Anomaly detection | Finds rare, unusual items | Isolation forest, one-class SVM | Fraud, equipment faults |
| Association rules | Finds items that occur together | Apriori, FP-growth | “Customers who buy X also buy Y” |
Supervised vs unsupervised learning
| Aspect | Supervised | Unsupervised |
|---|---|---|
| Data | Labelled | Unlabelled |
| Goal | Predict a known target | Discover structure |
| Evaluation | Compare with correct answers | Indirect measures and expert review |
| Typical tasks | Classification, regression | Clustering, anomaly detection |
How to evaluate unsupervised results
Without labels, you cannot calculate accuracy directly. Teams use internal measures such as the silhouette score (how well-separated clusters are), check whether groups are stable across different samples, and, most importantly, test whether results are useful. A customer segmentation is good if marketing campaigns built on it perform better.
How it supports other methods
Unsupervised learning often feeds supervised models. Cluster labels can become features. Dimensionality reduction can simplify inputs. Related ideas power self-supervised learning, where models learn from raw, unlabelled data at huge scale, the approach behind large language models.
Limitations
Unsupervised algorithms always find some structure, even in random data. Groups can be meaningless without careful review. Results depend heavily on feature choice and scaling. And different algorithms can produce very different answers on the same data. Treat outputs as hypotheses to test, not facts.
