This release is a pre-release and may not be stable for production use.
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.
Metadata
Release files for DistributionIV 0.0.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| DistributionIV-0.0.0.dev0.tar.gz | 2.4 kB | Without provenance | Details for DistributionIV-0.0.0.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| DistributionIV-0.0.0.dev0-py3-none-any.whl | Python 3 | none | any | Details for DistributionIV-0.0.0.dev0-py3-none-any.whl |
Total release size: 5.1 kB
Release files / DistributionIV-0.0.0.dev0.tar.gz
| Download URL | DistributionIV-0.0.0.dev0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
656e8dfde760557aff280ee0cbb5af83198e133a218df7e73d707ce44f135ed0
|
|
BLAKE2b-256 checksum How to use checksums |
86cb61e016190d9972d7387d9975b1142cc778cbcaf5063c231357774e14ee06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / DistributionIV-0.0.0.dev0-py3-none-any.whl
| Download URL | DistributionIV-0.0.0.dev0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3de0bbc85691d6e1cef7a15bcfe8e0268d3c4241ed28b572491e41738302b735
|
|
BLAKE2b-256 checksum How to use checksums |
03602b333fe11de8014884dbd98ebaea816ffcca38f35b86e4208bbdffa4e2eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for DistributionIV 0.0.0.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.