Counterfactual time-series prediction with encoder-decoder networks