Just wanted to highlight a potential issue in the code in chapter 19. In the code below, I think you mixed m1 and m2 in the assign method. It makes the interpretation of the results presented in the chapter quite confusing.
prices_rnd_pred = prices_rnd.assign(**{
"m1_pred": m2.predict(prices_rnd[X]), ## predictive model
"m2_pred": predict_elast(m1, prices_rnd), ## elasticity model
"m3_pred": np.random.uniform(size=prices_rnd.shape[0]), ## random model
})
This code is located just before the section Elasticity by Model Band¶
Thanks a lot for your excellent content!
Just wanted to highlight a potential issue in the code in chapter 19. In the code below, I think you mixed m1 and m2 in the assign method. It makes the interpretation of the results presented in the chapter quite confusing.
This code is located just before the section Elasticity by Model Band¶