Data Science, Causal Inference, Machine Learning, Optimization, Notes From Industry.
np.random.normal(size=n) * 0.5 y_train = y X_train = np.hstack((X, T.reshape(-1, 1))) return y_train, X_train, T_mm, tau The X features are confounding variables: User generated image We use the data generator to create samples for 3 products, each with a different treatment effect: