Types of Machine Learning Based on How the Model is Trained- Day4
(Batch Learning vs Online Learning)
In previous videos, we discussed types of machine learning based on the amount of supervision, such as:
Supervised Learning
Unsupervised Learning
Semi-Supervised Learning
Reinforcement Learning
Today, we are going to discuss another classification of Machine Learning, which is completely different.
This classification depends on how a machine learning model is trained and updated in production.
What is Production? (Simple Definition)
When you create any software or ML model:
Training on your local machine is called the development environment
Running that software or ML model on a server so that users can access it is called production
In Machine Learning:
You train the model first
Then deploy it on a server
The server keeps answering user requests using that trained model
Based on how training happens and how updates are done, machine learning is divided into:
Batch Learning (Offline Learning)
Online Learning
Batch Learning (Offline Learning)
What is Batch Learning?
Batch learning is the traditional way of training machine learning models.
In batch learning:
The entire dataset is used at once
The model is trained one time using all available data
After training, the model is deployed to production
The model does not learn further automatically
📌 Important Point:
There is no incremental learning in batch learning.
How Batch Learning Works (Step-by-Step)
You collect a large dataset
You train the model offline (on your local machine or training server)
You test the trained model
You deploy the trained model to production
The model keeps making predictions using old knowledge
Example:
You train a movie recommendation system using existing movie data
After deployment, it keeps recommending movies
But it does not learn about new movies automatically
Major Problem with Batch Learning
The model becomes static.
Real-world business data is always changing:
New movies are released
User interests change
New spam techniques appear in emails
Trends change every day
If the model is not updated:
Recommendations become outdated
Spam filters fail
User experience degrades
To fix this:
You must retrain the model again and again
Upload new data
Retrain
Test
Redeploy
This process is slow and expensive
Disadvantages of Batch Learning
1. Huge Data Problem
When data becomes very large, training becomes:
Time-consuming
Costly
Hardware-dependent
2. Hardware Limitations
Sometimes machines cannot process the entire dataset at once
Memory and compute become bottlenecks
3. No Real-Time Updates
Model updates happen after fixed intervals (daily, weekly, monthly)
Cannot react immediately to new trends or events
4. Connectivity Issues
Some models run in places where:
Internet is not always available
Example:
Mobile apps in remote areas
Satellites
On-device ML models
In such cases:
You cannot frequently retrain and redeploy models
Real-Life Example of Batch Learning Failure
Think of a social media feed:
User interests change quickly
Breaking news spreads instantly
If the feed updates only after 24 hours:
User sees outdated content
Important trending news is missed
Engagement drops
Batch learning cannot handle such fast-changing environments effectively
Why Batch Learning is Not Always Ideal
Batch learning works well when:
Data is stable
Updates are not frequent
Real-time learning is not required
But it fails when:
Data changes continuously
User behavior evolves rapidly
Immediate adaptation is required
This is Why We Need Another Approach…
To solve these problems, Online Learning is used.
➡️ In Online Learning:
The model learns continuously
New data is processed incrementally
The model keeps improving in real-time


