Advanced level · Module 4: Deploying Machine Learning Models · Lesson 3 of 4
Batch and Real-Time Deployment
Choose between scheduled batch predictions and on-demand APIs based on how predictions are used.
In this lesson you will
- Compare batch and real-time prediction
- Implement a scheduled batch job
Key concepts
batch scoringreal-time inferencelatencyscheduling
The lesson
Batch deployment runs predictions on a schedule — for example every month for all markets — and stores the results. It is simple, robust and works well when decisions are periodic.
Real-time deployment answers requests on demand, needed when predictions depend on fresh input, such as a loan officer checking an application. It requires a service to be running and monitored.
Many organisations need only batch predictions. Choose the simpler option unless the decision truly requires immediate answers.
Step by step
- List how the price forecasts will be used.
- Write a batch script that produces a monthly report.
- Schedule it with cron or Task Scheduler.
- Compare its operating effort with the API.
Practice activity
Implement the monthly batch forecast and recommend batch or real-time deployment for the early-warning service.
Expected result: A working batch job and a justified deployment recommendation.
Check your understanding
-
When is batch deployment enough?
Show answer
When decisions are made periodically and do not need instant predictions.
-
What does real-time deployment require?
Show answer
A running, monitored service that answers requests on demand.
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.