Back to Study Material Machine Learning

Unsupervised learning

Unsupervised learning works with data that has no labels. Instead of learning to predict a known answer, the algorithm discovers patterns, groupings, or co...

Unsupervised learning

Finding Hidden Structure Without Labels

Unsupervised learning works with data that has no labels. Instead of learning to predict a known answer, the algorithm discovers patterns, groupings, or compressed representations within the data itself. This is valuable when labelling is too expensive, when the categories are not yet known, or when the goal is exploration rather than prediction.

The most common unsupervised task is clustering — grouping similar examples together. A streaming service might cluster its users based on viewing behavior without knowing in advance how many distinct audience types exist. The algorithm might discover natural segments: action fans who binge on weekends, documentary viewers who watch in short daily sessions, and so on. These segments can then inform personalized recommendations.

Dimensionality reduction is another important unsupervised task. High-dimensional data is difficult to visualize and computationally expensive to process. Algorithms like Principal Component Analysis compress data into fewer dimensions while retaining as much information as possible. This helps with visualization, noise reduction, and speeding up downstream models.

Anomaly detection can also be framed as unsupervised: train a model on normal behavior and flag examples that deviate significantly. Credit card fraud detection and server outage prediction use this approach.

A key difference from supervised learning: there is no straightforward way to evaluate an unsupervised model with a single accuracy number. Clustering quality is often judged by silhouette scores, inertia, or domain expert review rather than a ground-truth label comparison.

A concrete example: a retailer groups thousands of products into categories based on purchase patterns. No one pre-labelled the products — the clusters emerge purely from buying behavior data.

Exam tip: when asked to contrast supervised and unsupervised learning, focus on the presence or absence of labels and the shift in goal from prediction to discovery.