Deep Counterfactual Estimation with Categorical Background Variables