Skip to content
Machine Learning

What is the difference between online and batch learning?

Batch (offline) learning trains on the whole dataset at once and must be retrained to absorb new data. Online learning updates the model incrementally as each new example, or small group of examples, arrives.

datasciencetrivia.com

Card 1 of 259. Answer: Batch (offline) learning trains on the whole dataset at once and must be retrained to absorb new data. Online learning updates the model incrementally as each new example, or small group of examples, arrives.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Batch, or offline, learning trains on all the available data at once and deploys a fixed model; to learn from new data you retrain, usually from scratch. Online learning updates the model incrementally as each new example, or small group of examples, arrives, so it learns from a stream and can discard data once used.

The simplest online learner is a running mean: if four values average 10 and a fifth value of 20 arrives, the new mean is 10 + (20 − 10)/5 = 12, without storing the first four. Online gradient methods likewise take one step, w ← w − η ∇L(w), per new example.

Don't confuse batch learning with batch or mini-batch gradient descent: a batch learner may train with mini-batches. Online learning suits streams and drifting patterns such as fraud, and its learning rate sets how fast it forgets the past. Its risk: bad input, from a bug or an attacker, flows straight into the model, so monitor it and keep a rollback.

All questions