Tabular Regression
Scikit-learn
logistics
xgboost
delivery
driver-effort
fairrelay
File size: 2,189 Bytes
f46e3f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
library_name: sklearn
tags:
  - logistics
  - xgboost
  - delivery
  - sklearn
  - tabular-regression
  - driver-effort
  - fairrelay
datasets:
  - Cainiao-AI/LaDe-D
  - electricsheepafrica/africa-synth-retail-and-ecommerce-last-mile-delivery-data-nigeria
license: mit
---

# FairRelay — Driver Effort Prediction Model

Part of the **[FairRelay](https://github.com/MUTHUKUMARAN-K-1/FairRelay)** AI logistics platform.

## Model Description

Driver Effort Prediction Model

**Type**: XGBRegressor Pipeline  
**Framework**: scikit-learn Pipeline + XGBoost  
**Task**: Regression

## Performance

- **R²**: 0.9702
- **MAE**: 3.6631
- **RMSE**: 6.9566
- **CV R² (5-fold)**: 0.9732 ± 0.0016


## Input Features

| Feature | Importance |
|---------|-----------|
| `num_packages` | 0.2922 |
| `total_weight_kg` | 0.0802 |
| `num_stops` | 0.0793 |
| `route_difficulty_score` | 0.0059 |
| `estimated_time_minutes` | 0.4706 |
| `experience_days` | 0.0601 |
| `recent_avg_workload` | 0.0029 |
| `recent_hard_days` | 0.0087 |


## Usage

```python
from skops import io as sio
from huggingface_hub import hf_hub_download

# Download and load
model_path = hf_hub_download(repo_id="muthuk1/fairrelay-driver-effort", filename="model.skops")
untrusted = sio.get_untrusted_types(file=model_path)
model = sio.load(model_path, trusted=untrusted)

# Predict
import numpy as np
features = np.array([[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]])
prediction = model.predict(features)
```

## Training Data

- **Cainiao-AI/LaDe-D**: Real last-mile delivery data from Shanghai (KDD 2023)
- **Africa Synth Last-Mile**: Synthetic Nigerian delivery data
- **FairRelay Synthetic**: Physics-informed synthetic data calibrated to FairRelay's deterministic formulas

## Part of FairRelay

FairRelay is an AI-powered logistics platform for fair load consolidation and dispatch:
- 🚚 5-agent load consolidation pipeline (KMeans + OR-Tools CP-SAT)
- ⚖️ 8-agent fair dispatch pipeline (Gini optimization)
- 📊 XGBoost effort prediction + Thompson Sampling bandit
- 🌱 EV-aware routing with battery constraints

Built for **LogisticsNow Hackathon 2026** — Challenge #5: AI Load Consolidation

## License

MIT