๐ง What Does "Learning" Mean in Machine Learning?
๐ Table of Contents
- Introduction
- Core Idea: Adjusting Numbers
- Step-by-Step Learning
- Mathematical Foundation
- Gradient Descent Explained
- Different Models
- Key Takeaways
- Related Articles
๐ Introduction
The word "learning" in machine learning can be misleading. Machines don’t think or understand like humans. Instead, they adjust internal values called parameters using mathematical rules.
๐ข Core Idea: Adjusting Numbers
At its simplest, a model is just a mathematical equation:
$$ Price = Size \times w $$
Here:
- Size = input data
- w = parameter (weight)
⚙️ Step-by-Step Learning Process
1. Start with Random Values
$$ w = 100 $$
2. Make Prediction
$$ Prediction = 1000 \times 100 = 100000 $$
3. Calculate Error
$$ Error = Actual - Predicted $$
$$ Error = 150000 - 100000 = 50000 $$
4. Adjust Weight
$$ w_{new} = w + adjustment $$
5. Repeat
This happens thousands of times.
๐ Mathematical Foundation
๐ข Loss Function
To measure how wrong the model is:
$$ L = (y - \hat{y})^2 $$
Where:
- y = actual value
- \hat{y} = predicted value
๐ Optimization Goal
The goal is:
$$ \min L $$
We want to minimize the error.
๐ Gradient Descent Explained
Gradient descent is the method used to adjust parameters.
$$ w = w - \alpha \frac{dL}{dw} $$
Where:
- \alpha = learning rate
- \frac{dL}{dw} = slope (gradient)
Iteration 1: w = 100 → Error = 50000 Iteration 2: w = 120 → Error = 30000 Iteration 3: w = 140 → Error = 10000 Iteration 4: w = 150 → Error = 0
๐ค Learning in Different Models
| Model | What Changes |
|---|---|
| Linear Regression | Weights |
| Neural Networks | Millions of weights |
| Decision Trees | Splitting rules |