Buckets:
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| experiments | 5 items | ||
| scripts | 4 items | ||
| src | 13 items | ||
| .gitignore | 21 Bytes xet | 99f89a0f | |
| README.md | 2.22 kB xet | 968d62b8 | |
| __init__.py | 0 Bytes xet | 00000000 | |
| requirements.txt | 75 Bytes xet | 635532a9 |
Mixed Synthetic Nearest Neighbors (MSNN)
Mixed Synthetic Nearest Neighbors (MSNN) is an algorithm for matrix completion.
This repository implements the MSNN algorithm in Causal Matrix Completion under Multiple Treatments via Mixed Synthetic Nearest Neighbors, based on the Synthetic Nearest Neighbors (SNN) algorithm in Causal Matrix Completion. Please refer to the paper for details on the MSNN algorithm, as well as its operating assumptions and statistical guarantees.
The implementation also follows ideas and experimental settings from
Synthetic Interventions: Extending Synthetic Controls to Multiple Treatments. Some experiments use datasets made available in that paper's online supplemental materials. These datasets are not redistributed in this repository; please obtain them from the original supplemental page and place them under ./data/raw following the instructions below.
Additionally, please contact the authors below if you find any bugs or have any suggestions for improvement. Thank you!
Author: Minrui Luo (luomr22@gmail.com, luomr22@mails.tsinghua.edu.cn), Zhiheng Zhang (zhangzhiheng@mail.shufe.edu.cn, corresponding author)
Code dependencies
This code has the following dependencies:
- Python 3.13 with the libraries in requirements.txt
conda create -n MSNN python=3.13
conda activate MSNN
pip install -r requirements.txt
Data Download (case study)
Download the supplementary material (opre.2025.1590.cd.zip) of Synthetic Interventions and put the file prop99_raw_data.csv in the folder MixedSNN/data/raw.
Usage
We provide code of synthetic experiments (both MCAR and MNAR) and real-world case study (of Prop 99) in ./experiments.
1. synthetic experiments
on linux:
cd MixedSNN
bash scripts/syn_mcar.sh
bash scripts/syn_mnar.sh
python ./src/syn_final_results.py
2. ablation (violating assumption 3.5: same latent row factors)
syn_mcar_pert.sh
3. case study: California Prop 99
run ./experiments/estimation_case_study.ipynb in jupyter notebook.
- Total size
- 4.54 MB
- Files
- 100
- Last updated
- Aug 3
- Pre-warmed CDN
- US EU US EU