Linear Regression vs Random Forest · Imports & Exports
| Metric | Linear Regression | Random Forest |
|---|---|---|
| R² | 0.546 | 0.721 |
| MAE | $23.4M | $20.6M |
| RMSE | $29.0M | $22.7M |
| MAPE | 8.7% | 7.2% |
| Bias (MSD) | -$3.6M | -$9.2M |
| Metric | Linear Regression | Random Forest |
|---|---|---|
| R² | 0.513 | 0.638 |
| MAE | $19.5M | $15.0M |
| RMSE | $21.1M | $18.2M |
| MAPE | 32.0% | 24.6% |
| Bias (MSD) | $3.7M | $1.0M |
k-Means + Hierarchical · 25 Export Commodities · PCA Visualisation
PCA dim 0: −5.4 to −3.3 · Behaviourally isolated by both algorithms
Best diversification candidates · Distinct seasonal patterns
Low value · moderate variability
14 undifferentiated commodities · near-zero PCA separation
Rolling Z-Score · 12-Month Window · 4-Tier Classification
Apriori · Min Support 0.3 · Min Confidence 0.6 · Min Lift 1.2
| Antecedent → Consequent | Support | Conf. | Lift |
|---|---|---|---|
| Nuclear Reactors → Glass and Glassware | 0.375 | 0.750 | |
| Electrical Machinery → Plastics | 0.375 | 0.750 | |
| Fats and Oils → Vehicles | 0.375 | 0.750 | |
| Plastics → Nuclear Reactors | 0.354 | 0.708 | |
| Cereals → Electrical Machinery | 0.354 | 0.708 | |
| Ceramic Products → Plastics | 0.354 | 0.708 | |
| Fertilizer → Diesel and Others | 0.354 | 0.708 | |
| Soaps → Nuclear Reactors | 0.354 | 0.708 | |
| Tobacco Substitutes → Electrical Machinery | 0.354 | 0.708 | |
| Other Made-Up Textiles → Lime | 0.354 | 0.708 |
Nuclear Reactors/Boilers ↔ Glass and Glassware. Infrastructure investment and post-disaster reconstruction procurement cycles peak together.
Electrical Machinery ↔ Plastics. Coordinated intermediate goods procurement by Malawi's manufacturing sector — arrive in same months.
Fats/Oils ↔ Vehicles. Apparently unrelated but share one driver: forex availability. When forex is available, both spike simultaneously.
| Antecedent → Consequent | Support | Conf. | Lift |
|---|---|---|---|
| Spices → Cotton ⭐ Strongest rule | 0.396 | 0.792 | |
| Cotton → Spices | 0.396 | 0.792 | |
| Wooden Furniture → Tea | 0.375 | 0.750 | |
| Tobacco → Spices | 0.375 | 0.750 | |
| Macadamia Nuts → Tea | 0.375 | 0.750 | |
| Skins and Hides → Soya Beans | 0.354 | 0.708 | |
| Natural Rubber → Macadamia Nuts | 0.354 | 0.708 | |
| Pulses → Spices | 0.354 | 0.708 | |
| Beverages → Tobacco | 0.354 | 0.708 | |
| Scrap Metal → Apparel (Not Knitted) | 0.333 | 0.667 |
Tobacco, Tea, Spices, Macadamia Nuts all peak together in Q3 (Jul–Sep). Co-movement reflects Malawi's unified agricultural season — not production interdependencies.
Spices ↔ Cotton (Lift 1.583, strongest rule overall) — grown in same southern/central regions by same smallholder communities. Skins/Hides ↔ Soya Beans — livestock and rotation crops from same farms.