Machine Learning
Fundamentals
Understand Supervised & Unsupervised Learning with real-world examples and a clear visual flowchart.
Machine Learning (ML) is a branch of Artificial Intelligence where computers learn patterns from data — without being explicitly programmed for every rule. Instead of writing “if email says ‘lottery’, mark it spam”, we show the model thousands of labeled emails and let it discover the patterns itself.
The two most fundamental approaches are Supervised Learning — training on labeled examples with known answers — and Unsupervised Learning — finding hidden patterns in raw, unlabeled data without any guidance.
Supervised Learning
The model trains on labeled data — every example has a correct answer attached. Like a student studying with an answer key, it learns to map inputs to outputs and predict new data.
- Requires labeled training data
- Learns input → output mapping
- Goal: Predict or classify new data
- Types: Classification & Regression
Unsupervised Learning
The model explores unlabeled data and discovers hidden patterns on its own — like sorting unknown objects by shape without being told what anything is.
- No labels required
- Finds structure in raw data
- Goal: Group, compress, or generate
- Types: Clustering & Dim. Reduction
Email Spam Filter
Trained on millions of labeled emails to automatically detect spam in your inbox.
House Price Prediction
Learns from historical sales data to predict prices from size, location, and rooms.
Cancer Detection
Classifies medical scans as malignant or benign using labeled radiology images.
Customer Segmentation
Groups customers by behavior without pre-defined categories for targeted marketing.
Music Recommendations
Clusters songs by acoustic features to surface songs you’d love but never heard.
Fraud Detection
Spots unusual patterns in transactions without needing pre-labeled fraud examples.
labeled data?
or a category?
your goal?
| Aspect | ✅ Supervised Learning | 🔀 Unsupervised Learning |
|---|---|---|
| Training Data | Labeled (input + correct answer) | Unlabeled (input only) |
| Human Effort | High — labeling is costly | Low — no labels needed |
| Goal | Predict or Classify | Discover hidden structure |
| Algorithms | Linear Regression, SVM, Neural Nets | K-Means, DBSCAN, PCA, Autoencoders |
| Output Type | Label or continuous value | Cluster or compressed form |
| Evaluation | Accuracy, F1-score, MSE | Silhouette score, visual inspection |

