Types of Machine Learning (Supervised, Unsupervised, Reinforcement)
1) Supervised learning
You have inputs X and the correct outputs y.
Goal: learn a function f(X) โ yf(X) โ y.
Examples:
- Regression: predict a number (house price)
- Classification: predict a category (spam vs not spam)
false
flowchart LR X[Features (X)] --> M[Model] --> Y[Prediction (y_hat)] YT[True Label (y)] -. used for training .-> M
false
Common algorithms:
- linear/logistic regression
- KNN
- SVM
- decision trees, random forests
- gradient boosting
2) Unsupervised learning
You have inputs X but no labels.
Goal: discover structure.
Examples:
- clustering customers into groups
- anomaly detection
- dimensionality reduction (PCA)
false
flowchart LR X[Data (X)] --> A[Unsupervised Algorithm] --> S[Structure / Groups]
false
Common algorithms:
- k-means
- hierarchical clustering
- DBSCAN
- PCA
3) Reinforcement learning
You have an agent acting in an environment.
The agent learns by trial and error to maximize reward.
Examples:
- robotics
- game-playing agents
- dynamic resource allocation
false
flowchart LR Agent -->|action| Env[Environment] Env -->|state, reward| Agent
false
Key terms:
- state: what the agent observes
- action: what the agent does
- reward: feedback signal
- policy: strategy mapping states โ actions
Quick comparison table
| Type | Labels? | Output | Typical use |
|---|---|---|---|
| Supervised | Yes | prediction | spam, price, diagnosis |
| Unsupervised | No | clusters/structure | segmentation, anomalies |
| Reinforcement | Reward feedback | policy | control, games |
Mini-checkpoint
Pick a real problem and decide:
- supervised / unsupervised / RL
- what your
XXandyywould be
๐งช Try It Yourself
Exercise 1 โ Train-Test Split
Exercise 2 โ Fit a Linear Model
Exercise 3 โ Evaluate with MSE
If this helped you, consider buying me a coffee โ
Buy me a coffeeWas this page helpful?
Let us know how we did
