1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Regression with statsmodels in Python

Connected

Exercise

Predicting again

You've followed the prediction workflow several times now with different combinations of explanatory variables. Time to try it once more on the model with three explanatory variables. Here, you'll use the model with 3-way interactions, though the code is the same when using any of the three models from the previous exercise.

taiwan_real_estate and mdl_price_vs_all_3_way_inter are available. itertools.product is loaded.

Instructions 1/2

undefined XP
    1
    2

Create explanatory_data, formed from combinations of the following variables, in this order:

  • n_convenience should take the numbers zero to ten.
  • sqrt_dist_to_mrt_m should take a sequence from zero to eighty in steps of ten.
  • house_age_years should take the unique values of the house_age_years column of taiwan_real_estate.