Master data processing, modeling, and deep learning algorithms.
Unsupervised learning finds structure in data that has no labels. Instead of learning "this input maps to this answer," the algorithm discovers patterns on its own: groups of similar items, reduced representations, or unusual points that do not fit. This lesson focuses on clustering — especially K-means, which you will work through step by step — plus dimensionality reduction (PCA), anomaly detection, and the real-world uses like customer segmentation. You will also learn when to choose unsupervised over supervised methods. The examples use small, manually understandable datasets so you can follow the algorithm without needing external libraries.
| Labeled | Unlabeled | |
|---|---|---|
| Has a target? | Yes | No |
| Example | Each email marked spam/not | Raw customer records, no category |
| Goal | Predict the label | Find hidden structure |
K-means partitions data into k clusters. Each cluster has a centroid (its center). The algorithm alternates between assigning points to the nearest centroid and moving centroids to the mean of their assigned points.
| Supervised | Unsupervised | |
|---|---|---|
| Input | Labeled data | Unlabeled data |
| Output | Predicted label/value | Clusters / structure |
| Evaluation | Compare to true labels | Harder, more subjective |
Grouping numbers into two clusters.
(two natural groups emerge)
Grouping shoppers by behavior.
(segments inform marketing strategy)