🔗 Live Interactive Application: Launch the Live Simulator
An end-to-end data science and machine learning application engineered to analyze, predict, and optimize smallholder farmer crop yields, market tier integration, and climate practice adoption constraints in Edo State, Nigeria. This repository integrates a predictive Random Forest backend with an interactive policy laboratory mapping multi-market relationships using primary smallholder field data.
The simulator is structured to handle behavioral variables, production economics, and macro institutional parameters smoothly:
- Predictive ML Backend (
machine_learning_model/): Houses the trained, cross-validated Random Forest Regressor asset (.pkl) calibrated on our 50-farmer primary cohort. - Microeconomic Engine (
app.py): Houses the value chain classification tiers and margin gap logic mapping farm-gate prices to consumer willingness-to-pay (WTP) metrics. - Behavioral Architecture: Computes a composite Behavioral Adoption Score based on model-derived feature weights to isolate the tipping point where structural constraints block climate adaptation.
Through multiple linear regression modeling, the intervention isolated the standalone impact of extension training. The training treatment effect remained statistically robust (
By tracking interactions between physical inputs and knowledge networks, the Random Forest model isolated the combined impact of physical resources and technical execution.
- Primary Predictive Driver: Extension training capacity building achieved the single highest predictive weight (40.5% Feature Importance), proving that fertilizer efficiency is structurally unlocked when combined with extension education.
The system models how institutional constraints block market integration:
- Tier 0 (Informal Spot Market): Drags farmers down when land tenure security is < 40% or credit access is < 30%, resulting in a massive Value Chain Premium Gap when compared to retail certified demand metrics.
- Tier 3 (Premium Supermarket/Global Channel): Unlocked only when land assets are fully titled and formal credit access pathways clear structural barriers.
Follow these terminal instructions to clone the architecture and run the simulator locally:
git clone [https://github.com/unityaaron/value-chain-exclusion-simulator.git](https://github.com/unityaaron/value-chain-exclusion-simulator.git)
cd value-chain-exclusion-simulator