2. Learning Paradigms in ML
In this, you will learn about Batch Learning vs Online Learning, and Instance-Based Learning vs Model-Based Learning in Machine Learning.
2. Learning Paradigms in ML
In this, you will learn about Batch Learning vs Online Learning, and Instance-Based Learning vs Model-Based Learning in Machine Learning.

Learning Paradigms in ML
Batch Machine Learning (Offline Learning)

How Batch Learning Works
This is a traditional way of training a Machine Learning model where the entire data is used to train the model once. There is no incremental training means the model is trained using the entire dataset at once, not step-by-step with new data.
Offline Training: Here, the size of the data is very huge, so the computation cost is very high. That’s why batch learning is generally done on Engineer Machines.
Deployment: Once the model is trained and tested, it is deployed to the production server, where it predicts the output based on the knowledge it learned during training.
Problem of Staleness: A major drawback of this learning is that once the model is trained and deployed on the server, it becomes static and cannot learn from new data automatically. This cause the model to become outdated over time.
Re-training Process: To overcome staleness, models need to be re-trained periodically. This process involves gathering new data, merging it with old data, re-training the model, testing it, and then re-deploying it to the server.
Major Disadvantages:
Data Size Limitations: If the dataset becomes too large, existing tools not able to process it efficiently, making batch training difficult or sometime impossible
Hardware/Connectivity Limitations: Batch learning struggles in environments with limited resources or no internet connectivity, like a defense application in a remote area or a satellite in space
Timeliness Issues: Batch models can’t react instantly to rapidly changing trends or news
Online Machine Learning

How Online Machine Learning Works
Online Learning is an incremental training process in which models are continuously updated with small batches of new data generally in real-time or on server
How online machine learning works
Initially, a model is trained on a small dataset and then deployed on the server.
As new data streams in, the model makes predictions on this data and simultaneously learns from it, dynamically adapting its behavior.
When to use online Machine Learning
Concept Drift: Ideal for problems where the nature of the data changes over time (where the nature of the problem is volatile).
Ex.- Stock Prices, E-Commerce, etc.
Cost-Effectiveness: It is a lot more cost-efficient for large-scale operations as it avoids frequent retraining of the entire dataset.
Fast Solutions: Provides quicker system adaptation, as training happens continuously and in real time without significant delays from batch processing.
Examples of Online ML in Action
Spam Email Filtering: Here the model continuously learns from new incoming emails. Initially, the model is trained on a dataset of spam and non-spam emails. As new emails arrive, the model predicts whether they are spam or not. When users mark emails as spam or not spam, the model learns from this feedback and updates itself. This allows the system to adapt to new spam patterns and improve its accuracy over time.
Recommendation Systems (YouTube, Netflix, Amazon): Recommendation systems continuously update suggestions based on user behavior. When a user watches videos, searches for products, or clicks on content, the system learns from these actions in real time. As user preferences change, the model adapts and provides more personalized recommendations. This helps platforms like YouTube, Netflix, and Amazon improve user experience by showing relevant content dynamically.
Stock Market Prediction: Stock market prediction systems use Online Machine Learning because stock prices and market conditions change continuously. The model is initially trained on historical data and then deployed. As new market data arrives, the model makes predictions and updates itself using the latest information. This helps the system adapt to changing trends and improve prediction accuracy over time, making it useful for algorithmic trading and financial analysis.
Online Learning Rate
It refers to how much the model updates its knowledge from new data during training. Setting the correct learning rate is important to ensure that the model learns new information without forgetting old patterns too quickly, and also that the model does not learn too slowly.
Out-of-Core-Learning
It is a concept where datasets are too large to fit into memory at once. Out-of-Core Learning techniques, especially incremental training, allow these large datasets to be processed in smaller batches, enabling the model to learn efficiently without requiring all the data in memory simultaneously.
Disadvantages of Online Machine Learning
Complexity Online Machine Learning systems are more complex to design, implement, and maintain compared to batch learning systems. Since the model updates continuously, it requires proper data pipelines, real-time processing, and monitoring mechanisms.
Example: A real-time recommendation system must handle streaming data, update the model, and serve predictions simultaneously.
Risk of Model Degradation Since the model learns continuously from new data, if the incoming data is noisy, biased, or incorrect, the model can learn wrong patterns and its performance may degrade over time.
Example: A fraud detection system may learn incorrect behavior if false transaction labels are provided.
Difference Between Offline Learning and Online Learning

Instance Based Learning (Lazy Learning)

Instance Based Learning (Lazy Learning)
In this learning, the model memorizes the training data instead of building a general model. When new data arrives, the model compares it with the stored instances based on similarity. It then predicts the output based on the nearest similar data points.
A major characteristic is that the model does not learn during the training phase. It simply stores the data and performs learning only when a new query is given. That’s why it is called lazy learning.
Examples :
1. Recommendation System (Amazon / Netflix): In recommendation systems, the model compares a user’s behavior with other similar users. For example, if two users have watched or purchased similar items, the system recommends products based on what similar users liked. The model does not build a general model but uses stored user data and finds the most similar instances to make predictions.
2. Face Recognition System: In face recognition, the system stores face data of different people. When a new face is given, the model compares it with the stored faces based on similarity. It then identifies the person by finding the closest matching face from the stored instances.
Model Based Learning

Model Based Learning
In this algorithm, model learns the underlying patterns or principles from the training data and creates a mathematical model. This model can be a function or decision boundary which separates the classes.
Once the model is trained then it doesn’t need the original training data to make predictions. It uses the rules and concepts which it learned during training. This approach focuses on generalizing rules from the data
Examples :
1. Linear Regression (House Price Prediction): In Linear Regression, the model learns the relationship between input features (like house size, number of rooms, location) and the output (house price). It creates a mathematical equation that represents this relationship. Once trained, the model uses this equation to predict the price of new houses without needing the original training data.
2. Logistic Regression (Spam Email Classification): In Logistic Regression, the model learns patterns from labeled email data and creates a decision boundary that separates spam and non-spam emails. After training, the model uses the learned parameters to classify new emails as spam or not spam without storing the original training data.
Difference Between Instance Based Learning and Model Based Learning

Difference Between Instance Based Learning and Model Based Learning
메타데이터
- post_id
- 2f596cf6b362
- slug
- learning-paradigms-in-ml-2f596cf6b362
- url
- https://medium.com/@ankitmourya9211/learning-paradigms-in-ml-2f596cf6b362
- canonical_url
- https://medium.com/@ankitmourya9211/learning-paradigms-in-ml-2f596cf6b362
- author_url
- https://medium.com/@ankitmourya9211
- status
- ok
- fetched_at
- 2026-06-09 14:34:10