Skip to main content
Pre-release

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.

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)

Source distribution for DistributionIV 0.0.0.dev0
File Size Uploaded
DistributionIV-0.0.0.dev0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DistributionIV 0.0.0.dev0
File Interpreter ABI Platform
DistributionIV-0.0.0.dev0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.0.dev0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page