Unsupervised Learning

Which is a type of unsupervised learning?

Clustering, dimensionality reduction and association rules are types of unsupervised learning. Learn how to tell them apart from supervised methods.

On this page
  1. The quick test
  2. Common unsupervised types
  3. Sorting common methods
  4. Answering a multiple-choice question
  5. Where the lines blur
  6. Summary

Clustering, dimensionality reduction and association rule learning are all types of unsupervised learning. Anomaly detection and some neural network methods, such as autoencoders, belong to the group too. What they share is that the training data has no target labels, so the algorithm has to find structure without being told the right answer.

The quick test

Ask one question: does the training data include the correct answer for each example? If it does, the method is supervised. If the data has only inputs and the goal is to find groups, compress features, flag unusual cases or find items that occur together, the method is unsupervised.

A second check is to look at what the method is for. A supervised model predicts a target you defined in advance, such as a price or a spam label. An unsupervised method reveals something about the data that you did not specify, such as group membership or a lower-dimensional representation.

Common unsupervised types

  • Clustering: K-means, DBSCAN, hierarchical clustering and Gaussian mixture models
  • Dimensionality reduction: principal component analysis (PCA), t-SNE and UMAP
  • Association rule learning: Apriori and FP-Growth
  • Anomaly detection: isolation forest, local outlier factor and one-class SVM
  • Neural methods: autoencoders and self-organizing maps

Sorting common methods

The table shows how some familiar methods fit the split. For the supervised side in more depth, supervised learning types with examples is a useful companion.

Method Learning type
Linear regression Supervised
Logistic regression Supervised
Decision tree Supervised
Random forest Supervised
K-means Unsupervised
PCA Unsupervised
Apriori Unsupervised
Isolation forest Usually unsupervised

Answering a multiple-choice question

A quiz question such as “Which is a type of unsupervised learning?” is often easiest to handle by ruling out options. Discard any option that needs labeled targets. Phrases such as “predict a label,” “classify into known classes” or “predict a numeric value” point to supervised learning. Phrases such as “group similar items,” “reduce the number of features,” “find rules” or “detect outliers” point to unsupervised learning.

Where the lines blur

Some methods don’t fit neatly into one box:

  • PCA is unsupervised, but it is often used as a preprocessing step before a supervised model. The method is still unsupervised; it is just part of a supervised pipeline.
  • Semi-supervised learning uses a small set of labeled examples alongside a larger set of unlabeled ones. It sits between the two categories.
  • Self-supervised learning creates its own targets from the data. It is often grouped with unsupervised learning, although some people treat it as a category of its own.
  • Some unsupervised results are checked against labels in a dataset that already has them. That is a way of evaluating the method, not a sign that training used labels.

Summary

The main test is whether the training data has labels. Clustering, dimensionality reduction, association rules, anomaly detection and autoencoders are all unsupervised. To recognize them, check whether the goal is to predict a known target or to find structure in the data.

The complete guide to unsupervised learning

Different Types of Unsupervised Machine Learning Algorithms
Read the guide

Keep exploring

Guides from other topics

All topics →