Generalization Bounds for Estimating Causal Effects of Continuous Treatments