始める無料で始める

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.

この演習はコースの一部です

Intermediate Regression with statsmodels in Python

コースを見る

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Create n_convenience as an array of numbers from 0 to 10
n_convenience = ____

# Create sqrt_dist_to_mrt_m as an array of numbers from 0 to 80 in steps of 10
sqrt_dist_to_mrt_m = ____

# Create house_age_years with unique values
house_age_years = ____

# Create p as all combinations of n_convenience, sqrt_dist_to_mrt_m, and house_age_years, in that order
p = ____

# Transform p to a DataFrame and name the columns
explanatory_data = ____

# See the result
print(explanatory_data)
コードを編集して実行