Skip to main content

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).

Metadata

Release files for miracle-imputation 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for miracle-imputation 0.1.6
File Interpreter ABI Platform
miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details
miracle_imputation-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 30.4 kB

Release files / miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl

Download URL miracle_imputation-0.1.6-py3-none-macosx_10_14_x86_64.whl
Size 15.1 kB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
c2098c5852795de63826734a6f8a1974529ee3deba7258166e7a3d052e880336
BLAKE2b-256 checksum
How to use checksums
a1641017e119a9e1cfffc99d1a42126ab6dfd93b3e10eefd5ac0b6222a7b0d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / miracle_imputation-0.1.6-py3-none-any.whl

Download URL miracle_imputation-0.1.6-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8ab1f22949d6e904c2de314911a1bb4973f03fc7a8301023247151ae9f3049f
BLAKE2b-256 checksum
How to use checksums
d3160b6316f99290b748fbde5858ec1e264bcad0119a61574ca27be3e8e64c09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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