This repository contains the implementation of Prediction-Powered Conditional Inference (PPCI). PPCI enables valid uncertainty quantification for conditional functionals (e.g., conditional means) in settings with scarce labeled data, rich unlabeled data, and an available black-box predictor.
- CUDA-enabled GPU environment
- Core computation is based on CuPy
The project has been reorganized into two main independent directories based on the type of inference:
Conditional_mean_inference/Conditional_quantile_inference/
Each directory contains its own core functions, simulation scripts, and real-data applications.
All files for mean inference are located in the Conditional_mean_inference/ directory.
Core File:
conditional_mean_functions.py— base functions for conditional mean inference
- Notebook:
simu_mean.ipynb - Outputs: CSV results are saved to
./results/and PDFs are generated in the root of this module.
- Location:
./census_income_data/ - Notebooks to run: -
Income_data_mean.ipynbIncome_data_different_unlabeled_sample_size.ipynb
- Outputs: CSV results and PDFs are saved to
./census_income_data/results/
- Location:
./blogfeedback_data/ - Important: run in the following order:
- Pre-processing: Run
data_process.ipynbfirst. This step generates processed predictions, training data, and test data used by the main analysis. - Main analysis: Run
blogfeedback_data_mean.ipynb
- Pre-processing: Run
- Outputs: CSV results and PDFs are saved to
./blogfeedback_data/results/
All files for quantile inference are located in the Conditional_quantile_inference/ directory.
Core File:
conditional_quantile_functions.py— base functions for conditional quantile inference
- Notebook to run:
Simu_conditional_quantile_new.ipynb - Plotting (optional):
plot_simu_qunatile.ipynb - Outputs: CSV results are saved to
./results/and PDFs (e.g.,simu_quantile_rmse_coverage_width_3x3.pdf) are generated in the root of this module.
- Location:
./census_income_data/ - Notebook to run:
Income_data_conditional_quantile_new.ipynb - Plotting (optional):
income_data_plot.ipynb - Outputs: CSV results and PDFs are saved to
./census_income_data/results/
Outputs are handled independently within their respective inference folders:
- Simulation:
[Inference_Type]/results/ - Census Income:
[Inference_Type]/census_income_data/results/ - BlogFeedback (Mean only):
Conditional_mean_inference/blogfeedback_data/results/