Empirical validation of semigroup pruning algorithms for agricultural intervention planning: Code and data.
收藏DataCite Commons2026-05-02 更新2026-05-07 收录
下载链接:
https://zenodo.org/doi/10.5281/zenodo.19989566
下载链接
链接失效反馈官方服务:
资源简介:
# Semigroup Pruning Validation: Software for Agricultural Intervention Planning
## Overview
This software implements data extraction, preprocessing, and semigroup pruning algorithms for agricultural intervention planning. Following the theoretical framework of Sampson et al. (2026) - https://doi.org/10.21203/rs.3.rs-9567992/v1, the code defines a state space X = G × P (6 growth stages × 2 pest pressure levels) and five intervention types (Irrigation, Fertilizer, Pesticide, Harvest, Identity). Empirical transition estimates ĥ_a are computed from crop calendar data, the dependence set D(S) is identified, and both unordered (Algorithm 4.0) and ordered (Algorithm 4.1) pruning algorithms are applied to determine minimal generating sets of interventions.
## Key Features
- **Simulated Data Generation**: Generates realistic crop calendar data calibrated to real agricultural patterns in African farming systems (2010-2024, 17 countries, 8 crops)- **Real Data Extraction**: Extracts and processes real crop calendar data from FAO/World Bank patterns (2024 growing season, 7 countries, 6 crops)- **Comparative Analysis**: Compares pruning results between simulated and real data to validate simulation calibration- **Dependence Set Computation**: Identifies D(S) = {P, H} (Pesticide and Harvest are redundant)- **Pruning Algorithms**: Implements both unordered (Algorithm 4.0) and ordered (Algorithm 4.1) pruning- **Output Generation**: Produces console output, CSV tables, and comparison reports
## Main Results from the Software
The software revealed that both Pesticide and Harvest are redundant generators, yielding a pruning gain of 40%. The minimal generating set is {I, F, id} (Irrigation, Fertilizer, Identity). These results were consistent across both simulated and real data, confirming the robustness of the semigroup pruning framework.
## Repository Contents
The main file to be downloaded is `semigroup_pruning_validation.zip`, which contains all the following files:
| File | Description ||------|-------------|| `extract_crop_calendar_data_v2.py` | Main Python script (simulation + real data extraction + comparative analysis) || `output_comparative_analysis.txt` | Complete console output showing all results || `requirements.txt` | Python dependencies (pandas, numpy, requests) || `README.md` | Setup and usage instructions || `data/real_data_sample.csv` | Sample of real crop calendar data extracted || `data/simulated_data_sample.csv` | Sample of simulated data for reference || `paper/main.tex` | LaTeX source of the accompanying paper |
## Requirements
- Python 3.8 or higher- pandas >= 2.0.0- numpy >= 1.24.0- requests >= 2.31.0 (for potential API access)
## Installation and Usage
```bash# Extract the zip fileunzip semigroup_pruning_validation.zip
# Navigate to the directorycd semigroup_pruning_validation
# Install dependenciespip install -r requirements.txt
# Run the main scriptpython extract_crop_calendar_data_v2.py
# To save output to a filepython extract_crop_calendar_data_v2.py > output.txt
提供机构:
Zenodo
创建时间:
2026-05-02



