Day 2 | WISE Workshop — Addis Ababa 2026
2026-02-03
Foundations
Algorithms
Hands-On
“Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed.”
— Arthur Samuel, 1959
In health economics and supply chain contexts, ML helps us:
Can we accurately predict supply chain outcomes?
| Approach | Primary Goal | Focus | Key Question |
|---|---|---|---|
| Statistics | Inference | Uncertainty | What is the relationship? |
| Econometrics | Causation | Identification | Does X cause Y? |
| Machine Learning | Prediction | Performance | What will Y be? |
For supply chain modeling: We often need prediction (ML) to feed into simulation (ABM)
| Task | Traditional | ML Approach | Benefit |
|---|---|---|---|
| Demand Forecasting | ARIMA, exponential smoothing | Random forests, gradient boosting | Captures complex patterns |
| Stockout Risk | Threshold rules | Ensemble classification | Earlier warning |
| Lead Time | Average + buffer | ML with facility features | Facility-specific estimates |
| Optimal Reorder | EOQ formulas | Reinforcement learning | Adapts to context |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ (X, Y) │ ──▶ │ Learn f() │ ──▶ │ f̂(X) → Ŷ │
│ Features & │ │ from data │ │ Fitted │
│ Outcomes │ │ │ │ model │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Compare │ ◀── │ New X → Ŷ │ ◀── │ Deploy │
│ Ŷ vs Y │ │ Forecast │ │ & Use │
└─────────────┘ └─────────────┘ └─────────────┘
The Machine Learning Pipeline: From data to predictions
Imagine we have historical data on medication orders:
| Feature (X) | Example Value |
|---|---|
| Facility type | District hospital |
| Population served | 150,000 |
| Season | Rainy (malaria high) |
| Previous month demand | 500 units |
| Distance to warehouse | 45 km |
| Outcome (Y) | Next month demand: 620 units |
Goal: Learn \(f()\) such that \(\hat{y} = f(X)\) predicts demand well
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ UNDERFITTING │ │ JUST RIGHT │ │ OVERFITTING │
│ │ │ │ │ │
│ ───────── │ │ ~~~~ │ │ ~~/\~/\~~ │
│ • • • • │ │ • • • • │ │ • • • • │
│ │ │ │ │ │
│ Too simple │ │ Balanced │ │ Too complex │
│ High bias │ │ complexity │ │ High variance │
└──────────────────┘ └──────────────────┘ └──────────────────┘
Error
│
│ ╲ ╱ Test Error
│ ╲ ╱
│ ╲ ──────── ╱
│ ╲ ╱ ╲
│ ╳ ╲
│ ╱╲ ╲ Training Error
│ ╱ ╲ ╲
└─────────────────────────────▶
Low ★ High
Model Complexity
┌────────────────────────────────────────────────────────┐
│ All Data (100%) │
├────────────────────────┬──────────────┬────────────────┤
│ Training (60%) │ Val (20%) │ Test (20%) │
│ │ │ │
│ Learn patterns │ Tune model │ Final eval │
│ │ │ │
└────────────────────────┴──────────────┴────────────────┘
Golden Rule: Never touch the test set until the very end!
More robust than a single train/val split:
Fold 1: [ TRAIN ] [ TRAIN ] [ TRAIN ] [ TRAIN ] [ VAL ]
Fold 2: [ TRAIN ] [ TRAIN ] [ TRAIN ] [ VAL ] [ TRAIN ]
Fold 3: [ TRAIN ] [ TRAIN ] [ VAL ] [ TRAIN ] [ TRAIN ]
Fold 4: [ TRAIN ] [ VAL ] [ TRAIN ] [ TRAIN ] [ TRAIN ]
Fold 5: [ VAL ] [ TRAIN ] [ TRAIN ] [ TRAIN ] [ TRAIN ]
5-Fold CV: Train on 4 folds, validate on 1, rotate. Average results.
For predicting continuous outcomes (e.g., demand quantities):
| Metric | Formula | Interpretation |
|---|---|---|
| MSE | \(\frac{1}{n}\sum(y_i - \hat{y}_i)^2\) | Average squared error |
| RMSE | \(\sqrt{MSE}\) | Same units as Y |
| MAE | \(\frac{1}{n}\sum\|y_i - \hat{y}_i\|\) | Average absolute error |
| R² | \(1 - \frac{SS_{res}}{SS_{tot}}\) | Variance explained |
For supply chain: RMSE and MAE are intuitive (“off by X units on average”)
For predicting categories (e.g., stockout: yes/no):
| Metric | What it measures |
|---|---|
| Accuracy | Overall % correct |
| Precision | Of predicted positives, % actually positive |
| Recall | Of actual positives, % correctly predicted |
| F1 Score | Harmonic mean of precision and recall |
| AUC-ROC | Discrimination ability across thresholds |
For stockout prediction: Recall matters (don’t miss actual stockouts!)
1. Define the problem ──▶ What are we predicting? Why?
2. Collect and prepare data ──▶ Features, outcomes, cleaning
3. Feature engineering ──▶ Create informative inputs
4. Train candidate models ──▶ Linear, trees, ensembles...
5. Evaluate and compare ──▶ Cross-validation metrics
6. Tune best model ──▶ Hyperparameter optimization
7. Final evaluation ──▶ Test set performance
8. Deploy and monitor ──▶ Real-world use + updates
Roe et al. (2025) applied ML to predict drug shortages in South Korea:
| Model | Task | Performance |
|---|---|---|
| Model 1 | Duration prediction | 62% accuracy |
| Model 2 | Cause classification | >70% F1-score |
Shortage frequency, import status, alternative drug availability
Relevance: Similar approach to our WISE project supply chain forecasting
This real-world study demonstrates key concepts we’ll use today:
| Concept | Their Study | Our Workshop |
|---|---|---|
| Algorithm | Random Forest | Random Forest, Gradient Boosting |
| Task 1 | Shortage duration (classification) | Demand forecasting (regression) |
| Task 2 | Cause identification | Stockout risk prediction |
| Features | Drug characteristics, supply history | Facility characteristics, demand history |
| Application | Policy planning | Supply chain simulation |
Hands-on: In Notebook 05, you’ll replicate their approach with our supply chain data
Now that we understand the foundations, let’s explore the different types of algorithms we can use.
WISE Workshop | Data Sciences for Modeling & HTA