🧠 1. Supervised Learning
🔍 What it is:
In supervised learning, the machine is trained using labeled data — that means the input data already comes with the correct answer (also called the “label”).
📊 Examples:
- Email spam detection – Emails are labeled as “spam” or “not spam”.
- House price prediction – You have past data with house size and price, and you want to predict price for new houses.
- Image classification – A dataset of cat and dog images, where each image is labeled as “cat” or “dog”.
📌 Algorithms:
- Linear Regression
- Logistic Regression
- Decision Trees
- Support Vector Machines
- Random Forests
- Neural Networks
🧠 2. Unsupervised Learning
🔍 What it is:
In unsupervised learning, the machine is given data without labels. It tries to find hidden patterns or structure in the data.
📊 Examples:
- Customer segmentation – Group customers into similar behavior types without knowing in advance what those groups are.
- Anomaly detection – Detect fraudulent credit card transactions that look different from the norm.
- Topic modeling – Grouping news articles based on similar topics, even though you don’t know the topics beforehand.
📌 Algorithms:
- K-Means Clustering
- Hierarchical Clustering
- DBSCAN
- PCA (for dimensionality reduction)
🧠 3. Reinforcement Learning
🔍 What it is:
In reinforcement learning, an agent learns by interacting with an environment. It takes actions, gets rewards or penalties, and learns which actions lead to the best rewards over time.
📊 Examples:
- Self-driving cars – Learn to drive by making decisions and getting feedback based on performance.
- Game playing (like chess or video games) – The agent learns strategies to win.
- Robotics – A robot learns to walk or pick up objects by trial and error.
📌 Key Concepts:
- Agent, Environment, Actions, States, Rewards
- Q-Learning
- Deep Q Networks (DQN)
📋 Summary Table:
Type | Input Data | Output/Goal | Example Task |
---|---|---|---|
Supervised Learning | Labeled | Predict labels/values | Spam Detection |
Unsupervised Learning | Unlabeled | Discover patterns/groups | Customer Segmentation |
Reinforcement Learning | Environment + Feedback | Maximize reward over time | Game Playing Agent |