Supervised Learning
Supervised Learning
Supervised learning is like learning with a teacher. You're given examples with the correct answers, and you learn the pattern that connects inputs to outputs.
What Makes It "Supervised"?
The key characteristic: labeled data. Every training example includes both:
- Features (X): The input data
- Label (y): The correct answer
The model learns to map features to labels, then predicts labels for new data.
Loading Python Playground...
Two Types of Supervised Learning
1. Regression: Predicting Numbers
When the output is a continuous value (number on a scale).
Loading Python Playground...
2. Classification: Predicting Categories
When the output is a discrete category (one of several options).
Loading Python Playground...
Binary vs Multi-Class Classification
Loading Python Playground...
Common Supervised Learning Algorithms
Loading Python Playground...
The Supervised Learning Workflow
Loading Python Playground...
Regression vs Classification: Quick Comparison
| Aspect | Regression | Classification |
|---|---|---|
| Output type | Continuous numbers | Discrete categories |
| Example | Predict temperature: 72.5°F | Predict weather: Sunny/Rainy/Cloudy |
| Loss function | Mean Squared Error | Cross-Entropy |
| Evaluation | MAE, RMSE, R² | Accuracy, Precision, Recall |
Key Takeaways
- Supervised learning uses labeled data (inputs + correct outputs)
- Regression predicts continuous values (numbers)
- Classification predicts discrete categories
- The workflow: collect data → split → train → evaluate → predict
- This is the most common type of ML in industry
Next, we'll explore unsupervised learning - where machines find patterns without labeled answers!
Quiz
Question 1 of 520% Complete
0 of 5 questions answered

