Data Science, Machine Learning, Causal Inference, AI, Linear Programming.
second stage model the features are used to create interaction terms with the treatment residual. np.random.seed(123) # Train DML model using flexible stage 1 models dml1 = LinearDML(model_y=LGBMRegressor(), model_t=LGBMClassifier(), discrete_treatment=True) dml1.fit(y1, T=T1, X=X1, W=None) # Train