This repository provides a PyTorch implementation of the framework proposed in the paper:
Deep Learning for Individual Heterogeneity: An Automatic Inference Framework
by Max H. Farrell, Tengyuan Liang, and Sanjog Misra.
The framework introduces a deep learning approach to automatically infer individual-level heterogeneity in treatment effects. It combines machine learning techniques with causal inference principles to estimate Conditional Average Treatment Effects (CATE). Illustrates estimation and inference for the estimator for the average treatment effect.
- PyTorch Implementation: Leverages PyTorch for building and training neural networks with a MSE loss function as an example.
- Automatic Inference: Uses automatic differentiation to compute gradients for the influence function estimator.
- Python 3.7 or higher
- PyTorch 1.7 or higher
- NumPy
- Pandas
- Scikit-learn
- Clone the repository:
git clone https://github.com/rmmomin/causal-ml-auto-inference.git
cd causal-ml-auto-inference
- Install dependencies:
pip install -r requirements.txt
The main scripts and modules are located in the code/
directory.
causal-ml-auto-inference/
├── code/ # Source code for model training and evaluation
├── outputs/ # Saved models and results
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Original Paper: Deep Learning for Individual Heterogeneity: An Automatic Inference Framework
- Original R Code: R Implementation
- Another, more flexible PyTorch implementation
This project is licensed under the MIT License - see the LICENSE file for details.
This implementation is developed by Rayhan Momin, a Finance PhD student at UChicago Booth.
For any questions or issues, please open an issue on the GitHub repository.