v2-final: model card
Browse files
README.md
CHANGED
|
@@ -7,8 +7,7 @@ tags:
|
|
| 7 |
- sklearn
|
| 8 |
- tabular-regression
|
| 9 |
- workload
|
| 10 |
-
|
| 11 |
-
- Cainiao-AI/LaDe-D
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
|
@@ -18,45 +17,43 @@ Part of the **[FairRelay](https://github.com/MUTHUKUMARAN-K-1/FairRelay)** AI lo
|
|
| 18 |
|
| 19 |
## Model Description
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
**Version**: v2 — Retrained with realistic
|
| 24 |
|
| 25 |
-
**Type**:
|
| 26 |
**Task**: Regression
|
| 27 |
|
| 28 |
-
### v2
|
| 29 |
|
| 30 |
-
|
| 31 |
-
-
|
| 32 |
-
|
| 33 |
-
- **
|
| 34 |
-
|
| 35 |
-
- **Diverse distributions**: Normal, skewed, bimodal, heavy-tail effort patterns
|
| 36 |
|
| 37 |
## Performance
|
| 38 |
|
| 39 |
-
- **R²**: 0.
|
| 40 |
-
- **MAE**: 66.
|
| 41 |
-
- **RMSE**:
|
| 42 |
-
- **Train-Test Gap**: 0.
|
| 43 |
-
- **CV R² (5-fold)**: 0.
|
| 44 |
-
|
| 45 |
|
| 46 |
## Input Features
|
| 47 |
|
| 48 |
| Feature | Importance |
|
| 49 |
|---------|-----------|
|
| 50 |
-
| `num_packages` | 0.
|
| 51 |
-
| `total_weight_kg` | 0.
|
| 52 |
-
| `num_stops` | 0.
|
| 53 |
-
| `avg_fragility` | 0.
|
| 54 |
-
| `total_distance_km` | 0.
|
| 55 |
-
| `route_difficulty_score` | 0.
|
| 56 |
-
| `estimated_time_minutes` | 0.
|
| 57 |
-
| `packages_per_stop` | 0.
|
| 58 |
-
| `weight_per_package` | 0.
|
| 59 |
-
| `distance_per_stop` | 0.
|
| 60 |
|
| 61 |
|
| 62 |
## Usage
|
|
@@ -70,14 +67,14 @@ model_path = hf_hub_download(repo_id="muthuk1/fairrelay-workload-scoring", filen
|
|
| 70 |
untrusted = sio.get_untrusted_types(file=model_path)
|
| 71 |
model = sio.load(model_path, trusted=untrusted)
|
| 72 |
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
```
|
| 75 |
|
| 76 |
-
## Part of FairRelay
|
| 77 |
-
|
| 78 |
-
FairRelay is an AI-powered logistics platform for fair load consolidation and dispatch.
|
| 79 |
-
Built for **LogisticsNow Hackathon 2026** — Challenge #5: AI Load Consolidation.
|
| 80 |
-
|
| 81 |
## License
|
| 82 |
|
| 83 |
MIT
|
|
|
|
| 7 |
- sklearn
|
| 8 |
- tabular-regression
|
| 9 |
- workload
|
| 10 |
+
- route-optimization
|
|
|
|
| 11 |
license: mit
|
| 12 |
---
|
| 13 |
|
|
|
|
| 17 |
|
| 18 |
## Model Description
|
| 19 |
|
| 20 |
+
Predicts delivery route workload score based on package count, weight, stops, distance, difficulty, and fragility. The workload score quantifies how demanding a route is for a driver.
|
| 21 |
|
| 22 |
+
**Version**: v2 — Retrained with realistic data including hidden confounders, heteroscedastic noise, non-linear interactions, and measurement error. Properly regularized to prevent overfitting.
|
| 23 |
|
| 24 |
+
**Type**: XGBRegressor Pipeline (StandardScaler + XGBoost)
|
| 25 |
**Task**: Regression
|
| 26 |
|
| 27 |
+
### v2 vs v1
|
| 28 |
|
| 29 |
+
| Metric | v1 | v2 |
|
| 30 |
+
|--------|----|----|
|
| 31 |
+
| Test R² | 0.9969 (suspiciously high) | **0.7577** (realistic) |
|
| 32 |
+
| Train-Test Gap | 0.0010 | **0.0156** |
|
| 33 |
+
| Why | Clean formula + 5% noise | Hidden confounders, noise, interactions |
|
|
|
|
| 34 |
|
| 35 |
## Performance
|
| 36 |
|
| 37 |
+
- **R²**: 0.7577
|
| 38 |
+
- **MAE**: 66.13
|
| 39 |
+
- **RMSE**: 86.85
|
| 40 |
+
- **Train-Test R² Gap**: 0.0156 (no overfitting)
|
| 41 |
+
- **CV R² (5-fold)**: 0.7614 ± 0.0036
|
|
|
|
| 42 |
|
| 43 |
## Input Features
|
| 44 |
|
| 45 |
| Feature | Importance |
|
| 46 |
|---------|-----------|
|
| 47 |
+
| `num_packages` | 0.1573 |
|
| 48 |
+
| `total_weight_kg` | 0.0183 |
|
| 49 |
+
| `num_stops` | 0.4728 |
|
| 50 |
+
| `avg_fragility` | 0.0110 |
|
| 51 |
+
| `total_distance_km` | 0.0080 |
|
| 52 |
+
| `route_difficulty_score` | 0.2582 |
|
| 53 |
+
| `estimated_time_minutes` | 0.0420 |
|
| 54 |
+
| `packages_per_stop` | 0.0212 |
|
| 55 |
+
| `weight_per_package` | 0.0069 |
|
| 56 |
+
| `distance_per_stop` | 0.0044 |
|
| 57 |
|
| 58 |
|
| 59 |
## Usage
|
|
|
|
| 67 |
untrusted = sio.get_untrusted_types(file=model_path)
|
| 68 |
model = sio.load(model_path, trusted=untrusted)
|
| 69 |
|
| 70 |
+
# [num_packages, total_weight_kg, num_stops, avg_fragility, total_distance_km,
|
| 71 |
+
# route_difficulty_score, estimated_time_minutes, packages_per_stop,
|
| 72 |
+
# weight_per_package, distance_per_stop]
|
| 73 |
+
features = np.array([[25, 50.0, 15, 2.5, 12.0, 10.5, 120.0, 1.67, 2.0, 0.8]])
|
| 74 |
+
workload = model.predict(features)
|
| 75 |
+
print(f"Workload score: {workload[0]:.1f}")
|
| 76 |
```
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
## License
|
| 79 |
|
| 80 |
MIT
|