Distributional Instrumental Variable Method
Project description
Distributional Instrumental Variable Method (DIV)
Distributional Instrumental Variable Method is a neural network-based method to estimate distributional causal effects (interventional distributions) proposed in the paper "Distributional Instrumental Variable Method" by A. Holovchak, S. Saengkyongam, N. Meinshausen and X. Shen (2025).
Installation
The latest release of the Python package can be installed through pip:
pip install div
Usage Example
from div import DIV
## Fit a DIV model to data (x, y, z)
model = DIV(1, 1, 1, num_layer=4)
model.train(x, y, z, 10000, print_every_iter=1000)
## Evaluation
x_eval = torch.linspace(x.min(), x.max(), 5000).unsqueeze(1)
## interventional mean function
y_est_mean = model.predict_causal(x_eval, sample_size=1000)
Contact information
If you meet any problems with the code, please submit an issue or contact Xinwei Shen.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file DistributionIV-0.0.0.dev0.tar.gz.
File metadata
- Download URL: DistributionIV-0.0.0.dev0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656e8dfde760557aff280ee0cbb5af83198e133a218df7e73d707ce44f135ed0
|
|
| MD5 |
c1cf1c460ad6406831eb1676d4e7a9a9
|
|
| BLAKE2b-256 |
86cb61e016190d9972d7387d9975b1142cc778cbcaf5063c231357774e14ee06
|
File details
Details for the file DistributionIV-0.0.0.dev0-py3-none-any.whl.
File metadata
- Download URL: DistributionIV-0.0.0.dev0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3de0bbc85691d6e1cef7a15bcfe8e0268d3c4241ed28b572491e41738302b735
|
|
| MD5 |
21df272315947842c81808293ac69f74
|
|
| BLAKE2b-256 |
03602b333fe11de8014884dbd98ebaea816ffcca38f35b86e4208bbdffa4e2eb
|