Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DistributionIV-0.0.0.dev0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DistributionIV-0.0.0.dev0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

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

Hashes for DistributionIV-0.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 656e8dfde760557aff280ee0cbb5af83198e133a218df7e73d707ce44f135ed0
MD5 c1cf1c460ad6406831eb1676d4e7a9a9
BLAKE2b-256 86cb61e016190d9972d7387d9975b1142cc778cbcaf5063c231357774e14ee06

See more details on using hashes here.

File details

Details for the file DistributionIV-0.0.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for DistributionIV-0.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 3de0bbc85691d6e1cef7a15bcfe8e0268d3c4241ed28b572491e41738302b735
MD5 21df272315947842c81808293ac69f74
BLAKE2b-256 03602b333fe11de8014884dbd98ebaea816ffcca38f35b86e4208bbdffa4e2eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page