Skip to content
GenAI Learn/How Machines Learn
Browsing as a guest. Sign in to save your progress and earn XP as you complete chapters.

Unsupervised Learning: Finding Structure

3 min read

You'll learn to

  • -Define unsupervised learning and how it differs from supervised learning
  • -Recognize clustering and dimensionality reduction as the two main unsupervised tasks

Unsupervised learning removes the labels entirely. You give the algorithm a pile of unlabeled data and ask it to find structure, groupings, patterns, or a simpler representation, without ever telling it what the "correct" answer looks like.

Clustering: Finding Natural Groups

Clustering algorithms group similar examples together. A retailer might cluster customers by purchasing behavior without predefining what the groups should be. The algorithm might discover a cluster of weekend bulk buyers and a cluster of frequent small purchasers on its own, patterns a human analyst might never have thought to look for.

Dimensionality Reduction: Finding a Simpler Representation

Real-world data often has far more measured attributes than actually matter. Dimensionality reduction compresses data into fewer, more informative dimensions while preserving as much of the meaningful structure as possible, useful for visualization, for speeding up other algorithms, and for filtering out noise.

A simple way to remember the distinction: supervised learning answers a question you already knew how to ask, like "is this spam?" Unsupervised learning answers a question you did not know to ask, like "what natural groups exist in this data?"

  • -Because there are no labels to check against, evaluating unsupervised learning is inherently fuzzier than evaluating supervised learning.
  • -Unsupervised methods are often used as a first exploratory pass over data before deciding what supervised problem is even worth solving.
Interview Signal

Your team has a large database of user behavior with no predefined categories, and a stakeholder wants to know what types of users you have. How would you approach this, and how would you know if the result is any good?

Weak Answer

"I would build a classifier to sort users into a few obvious categories I already have in mind."

Strong Answer

"Since there is no predefined label for user type, this is an unsupervised clustering problem rather than a classification problem. I would run clustering over the behavioral features and let the algorithm discover groupings rather than imposing categories in advance. Evaluating the result is harder than in supervised learning, since there is no ground truth to check against, so I would look at whether the clusters are stable, interpretable to a domain expert, and actually useful for the business decision at hand, rather than relying on a single accuracy number."

Check Yourself1 / 3

What is the fundamental difference between unsupervised learning and supervised learning?

ScaleDojo Logo
Initializing ScaleDojo