शुरू करेंमुफ़्त में शुरू करें

फिर से प्रेडिक्ट करें

आपने अब तक कई बार अलग-अलग explanatory variables के कॉम्बिनेशन के साथ prediction वर्कफ़्लो फॉलो किया है। अब इसे एक बार और आज़माते हैं, उस मॉडल पर जिसमें तीन explanatory variables हैं। यहाँ आप 3-way interactions वाले मॉडल का उपयोग करेंगे, हालाँकि पिछले अभ्यास के किसी भी तीन मॉडलों के साथ कोड एक जैसा ही रहता है।

taiwan_real_estate और mdl_price_vs_all_3_way_inter उपलब्ध हैं। itertools.product लोडेड है.

यह अभ्यास पाठ्यक्रम का हिस्सा है

इंटरमीडिएट 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)
कोड संपादित करें और चलाएँ