Unsupervised learning is a machine learning approach where models learn patterns from data without being given correct answers or labels.
Input + Correct Answer. The model learns from labeled examples and predicts outputs.
Input Only. The model discovers hidden patterns automatically without labels.
Unlike supervised learning, there is no teacher providing correct answers. The model must identify patterns and relationships on its own.
The model analyzes feature relationships and attempts to discover meaningful patterns in the dataset.
Collect data
Analyze features and relationships
Discover patterns within the data
Create groups or simplify data
One of the primary goals of unsupervised learning is finding hidden structures within data.
Input — Age, Income, Spending
Possible Groups Found
Clustering groups similar observations together. Similar data points belong to the same cluster while different observations belong to separate clusters.
Input — Thousands of customers
Output
Marketing — Customer segmentation
Healthcare — Patient grouping by symptoms
Finance — Unusual transaction detection
Retail — Shopping behavior analysis
Biology — Gene and protein grouping
K-Means — Groups data around cluster centers
Hierarchical Clustering — Creates a hierarchy of clusters
DBSCAN — Finds dense regions of data
HDBSCAN — Improves DBSCAN for varying densities
Gaussian Mixture Models — Uses probability distributions for clusters
K-Means is one of the most popular clustering algorithms. It groups data around cluster centers called centroids.
Choose K clusters
Randomly place centroids
Assign each data point to the nearest centroid
Update centroids based on assigned points
Repeat until clusters are stable
Unsupervised learning can identify unusual observations known as anomalies or outliers.
Dimensionality reduction reduces the number of features while preserving as much important information as possible.
Before — 100 features
After — 10 features
PCA is one of the most widely used dimensionality reduction techniques. It creates new features called principal components that preserve the most important information.
t-SNE is a dimensionality reduction algorithm designed primarily for visualization.
UMAP is a modern dimensionality reduction technique that preserves both local and global structure while scaling efficiently to large datasets.
| Clustering | Dimensionality Reduction |
|---|---|
| Groups data | Simplifies data |
| Finds segments | Reduces features |
| Creates clusters | Creates compact representations |
| Customer segmentation | Feature reduction |
| Supervised Learning | Unsupervised Learning |
|---|---|
| Uses labels | No labels |
| Predicts outputs | Discovers patterns |
| Classification | Clustering |
| Regression | Dimensionality Reduction |
Business — Customer segmentation, market research
Finance — Fraud detection, risk analysis
Healthcare — Patient clustering, disease research
Technology — Recommendation systems, behavior analysis
Science — Gene analysis, astronomy research
A retail company has customer data but no customer labels. Explain how clustering could help the company better understand its customers and improve marketing strategies.
Ask the AI if you need help understanding or want to dive deeper into any topic.