Data Science, Causal Inference, Machine Learning, Optimization, Notes From Industry.
yhat_train) print(f'MSE on train set is {round(mse_train)}') print(f'R2 on train set is {round(r2_train, 2)}') return model, yhat_train We train an S-Learner for each product: np.random.seed(1234) model_1, yhat_train_1 = train_slearner(X_train_1, y_train_1) model_2, yhat_train_2 =