Code for **Counterfactual Generative Models for Time-Varying Treatments**

Thanks for checking our code pack :) 

The Jupyter notebook includes a demonstration of using the counterfactual generative model to generate 1-d counterfactual distributions. The notebook can be used to reproduce the results for MSCVAE and CVAE on the fully-synthetic datasets in Fig.4. The running time depends on the training size, and is around 3 mins for d=1, 10 mins for d=3, and >20 mins for d=5 using the recommended training size in the notebook.

To install the required packages, run 

'''
pip install -r requirements.txt
'''

Then run through the cells one by one in the notebook. 
