Skip to main content

Missing data Imputation Refinement And Causal LEarning

Project description

MIRACLE (Missing data Imputation Refinement And Causal LEarning)

Tests License

Code Author: Trent Kyono

This repository contains the code used for the "MIRACLE: Causally-Aware Imputation via Learning Missing Data Mechanisms" paper(2021).

Installation

pip install -r requirements.txt
pip install .

CUDA support (optional)

For CUDA support, you should make sure TensorFlow 2 CUDA requirements are met.

Install the library as above, then install the CUDA enabled version of TensorFlow by following the official instructions.

Tests

You can run the tests using

pip install -r requirements_dev.txt
pip install .
pytest -vsx

Contents

  • miracle/MIRACLE.py - Imputer/Refiner Class. This class takes a baseline imputation and returns a refined imputation. This code has been forked from [2].
  • miracle/third_party - Reference imputers: Mean, Missforest, MICE, GAIN, Sinkhorn, KNN.
  • tests/run_example.py - runs a nonlinear toy DAG example. Uses mean imputation as a baseline and applies MIRACLE to refine.

Examples

Base example on toy dag.

$ cd tests/
$ python run_example.py

This specific instantiation returns a Baseline RMSE of approximately 0.95 with MIRACLE RMSE of approximately 0.40.

An example to run toy example with a dataset size of 2000 for 300 max_steps with a missingness of 30%

$ python3 run_example.py --dataset_sz 2000 --max_steps 300 --missingness 0.3

Citing

@inproceedings{kyono2021miracle,
	title        = {MIRACLE: Causally-Aware Imputation via Learning Missing Data Mechanisms},
	author       = {Kyono, Trent and Zhang, Yao and Bellot, Alexis and van der Schaar, Mihaela},
	year         = 2021,
	booktitle    = {Conference on Neural Information Processing Systems(NeurIPS) 2021}
}

References

[1] Jinsung Yoon, James Jordon, and Mihaela van der Schaar. Gain: Missing data imputation using generative adversarial nets. In ICML, 2018.

[2] Trent Kyono, Yao Zhang, and Mihaela van der Schaar. CASTLE: Regularization via auxiliary causal graph discovery. In NeurIPS, 2020.

[3] Zheng, X., Aragam, B., Ravikumar, P., & Xing, E. P. (2018). DAGs with NO TEARS: Continuous optimization for structure learning (NeurIPS 2018).

[4] Zheng, X., Dan, C., Aragam, B., Ravikumar, P., & Xing, E. P. (2020). Learning sparse nonparametric DAGs (AISTATS 2020).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl (15.1 kB view details)

Uploaded Python 3 macOS 10.14+ x86-64

miracle_imputation-0.1.6-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c2098c5852795de63826734a6f8a1974529ee3deba7258166e7a3d052e880336
MD5 2a0b2984f86150186772887f3a314ee9
BLAKE2b-256 a1641017e119a9e1cfffc99d1a42126ab6dfd93b3e10eefd5ac0b6222a7b0d03

See more details on using hashes here.

File details

Details for the file miracle_imputation-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for miracle_imputation-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a8ab1f22949d6e904c2de314911a1bb4973f03fc7a8301023247151ae9f3049f
MD5 d1ad5551c930e4c61aab265247e8f377
BLAKE2b-256 d3160b6316f99290b748fbde5858ec1e264bcad0119a61574ca27be3e8e64c09

See more details on using hashes here.

Supported by

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