获取代码
从这台服务器直连下载,不经过代理,速度约为走代理的 3~5 倍。
仓库信息
- GitHub:RomanCohort/government-intervention-ml
- 默认分支:
main - 最后提交:2026-06-09 — Add GitHub push guide and setup script
- 主要语言:TeX
- 文件数:46(36 个可在线查看)
- 镜像 commit:
6c0ff945fd05
README
Government Intervention in County-Level Bidding Prediction
A Machine Learning Approach with Chinese Characteristics
Overview
This repository contains the code and documentation for a methodological framework that demonstrates how to operationalize Chinese political economy theories into machine learning features for predicting government bidding outcomes.
Important Notice: This is a methodological demonstration using simulated data. The simulation parameters are calibrated from published empirical research and statistical reports. We do not claim these results reflect actual government behavior.
Key Features
- Theory-Grounded Feature Engineering: Operationalize qualitative institutional theories (promotion tournaments, land finance, local state corporatism) into quantitative ML features
- Machine Learning Pipeline: Complete implementation using LightGBM with temporal holdout validation
- Interpretability Framework: SHAP-based analysis connecting model outputs to theoretical concepts
- Transparency Standards: Full disclosure of simulation methodology and data limitations
Repository Structure
ce_county_bidding/
├── data/ # Data acquisition and documentation
│ ├── CRAWLER_README.md # Data crawling guide
│ └── data_request_template.txt
├── src/ # Source code
│ ├── data_crawler.py # Web crawler framework
│ ├── crawl_ccgp.py # CCGP crawler implementation
│ └── data_acquisition_guide.py
├── output/ # Manuscripts and outputs
│ ├── manuscript_final.md # Main manuscript
│ ├── manuscript_science_society.md # Alternative version
│ ├── generate_figures.py # Figure generation code
│ └── figures/ # Generated figures (10 figures)
├── references/ # Reference materials
├── LICENSE
└── README.md
Installation
Requirements
python >= 3.8
pandas >= 1.3.0
numpy >= 1.21.0
scikit-learn >= 0.24.0
lightgbm >= 3.2.0
shap >= 0.40.0
matplotlib >= 3.4.0
seaborn >= 0.11.0
requests >= 2.26.0
beautifulsoup4 >= 4.10.0
Setup
# Clone the repository
git clone https://github.com/yourusername/ce_county_bidding.git
cd ce_county_bidding
# Install dependencies
pip install -r requirements.txt
Usage
1. Generate Figures
Generate all 10 figures used in the manuscript:
cd output
python generate_figures.py
This will create:
- figures/figure1_promotion_tournament.png
- figures/figure2_land_finance.png
- ...
- figures/figure10_shap_interaction.png
2. Data Acquisition (Optional)
If you want to collect real data:
# Note: Government websites have strict anti-scraping protections
# See data/CRAWLER_README.md for alternatives
cd src
python data_acquisition_guide.py
3. Generate Manuscripts
Convert markdown to Word/PDF:
cd output
# Plain text version
pandoc manuscript_final.md -o manuscript.docx
# Version with figures
python add_figures_to_tex.py
pandoc manuscript_with_figures.tex -o manuscript_with_figures.docx --resource-path=.
Manuscript Versions
We provide three versions for different journals:
-
Computational Social Sciences (Recommended) - File:
output/manuscript_honest_with_images.docx- Focus: Methodological innovation, feature engineering - See:output/README_CSS_VERSION.md -
Science & Society - File:
output/manuscript_science_society.docx- Focus: Marxist political economy, theory-method integration - See:output/README_SCIENCE_SOCIETY_VERSION.md -
Economics Journal - File:
output/manuscript_honest.docx- Focus: Empirical prediction, policy implications - See:output/README_HONEST_VERSION.md
Theoretical Framework
Promotion Tournament Theory
Based on Zhou Li'an's (2007, 2017) framework of hierarchical competition among Chinese local officials.
Operationalized Features: - Official age and tenure effects - Growth gap relative to provincial average - Proximity to planned turnover
Land Finance Theory
Based on Zhou Feizhou's (2012, 2015) analysis of fiscal structures and land-based accumulation.
Operationalized Features: - Land revenue dependency ratio - Fiscal gap and debt pressure - Infrastructure investment alignment
Local State Corporatism
Based on Oi (1992) and Walder's (1995) concept of government-enterprise coordination.
Operationalized Features: - Historical cooperation frequency - Local enterprise tax contribution - Employment maintenance pressure
Machine Learning Methodology
Model Architecture
- Algorithm: LightGBM (Ke et al., 2017)
- Validation: Temporal holdout (train: 2015-2020, test: 2022-2024)
- Interpretability: SHAP values (Lundberg & Lee, 2017)
- Robustness: Bootstrap confidence intervals
Results (Simulated Data)
| Model | R² | RMSE |
|---|---|---|
| Standard Economic | 0.52 | 0.192 |
| Intervention-Enhanced | 0.72 | 0.158 |
| Improvement | +0.20 | -18% |
Transparency Statement
This study uses simulated data for methodological demonstration.
Why Simulated Data?
- Government procurement websites have strict anti-scraping protections
- Detailed procurement data requires official access applications
- Our goal is methodological demonstration, not empirical claims
Calibration Sources
| Data Type | Source | Calibration Method |
|---|---|---|
| Economic structure | Statistical yearbooks | Log-normal distributions |
| Intervention intensity | Published studies | 0.3-0.7 range |
| Temporal patterns | Anti-corruption research | Campaign effects |
| Regional variation | Coastal-inland studies | Heterogeneity parameters |
What This Study Demonstrates
- How to operationalize qualitative theories into ML features
- Whether theory-grounded features improve prediction (in simulated scenarios)
- How to implement rigorous validation preventing overfitting
- How to interpret ML models in institutional contexts
What This Study Does NOT Claim
- ❌ Empirical evidence about actual government behavior
- ❌ Causal mechanisms of intervention
- ❌ Policy prescriptions for procurement reform
- ❌ Generalizable findings to real-world contexts
Contributing
We welcome contributions, especially:
- Real data validation: Apply the framework to actual procurement data
- Feature refinements: Improve theoretical operationalization
- Alternative contexts: Adapt to other institutional settings
- Method improvements: Enhance validation strategies
Please read CONTRIBUTING.md for details.
Citation
If you use this code or framework, please cite:
@article{government_intervention_ml,
title={A Methodological Framework for Government Intervention in County-Level Bidding Prediction: A Machine Learning Approach with Chinese Characteristics},
author={[Author names]},
journal={Computational Social Sciences},
year={2026},
note={Methodological demonstration using simulated data}
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Zhou Li'an for promotion tournament theory
- Zhou Feizhou for land finance theory
- Jean Oi and Andrew Walder for local state corporatism framework
Data Availability
- Simulation Code: Available in this repository
- Real Data: Not available due to access restrictions
- Calibration Parameters: Fully documented in manuscript
Contact
For questions about methodology or collaboration opportunities: - Email: [Your email] - Issues: Please use GitHub Issues for bug reports
Disclaimer
This is a methodological demonstration using simulated data. The results do not represent actual government bidding patterns in China. Researchers should apply this framework to real data for empirical validation.
Keywords: Computational Social Science, Machine Learning, Feature Engineering, Government Intervention, Chinese Political Economy, SHAP Interpretability