Learning Representations for Counterfactual Inference