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

मॉडल प्रदर्शन का आकलन

यह जाँचने के लिए कि कौन-सा तरीका बेहतर है — पूरा डेटासेट वाला मॉडल या हर हाउस-एज कैटेगरी के अलग-अलग मॉडल — आपको कुछ मेट्रिक्स निकालने होंगे। यहाँ, आप प्रत्येक मॉडल के लिए coefficient of determination और residual standard error की तुलना करेंगे।

प्राइस बनाम convenience stores की संख्या के चार मॉडल उपलब्ध हैं (mdl_all_ages, mdl_0_to_15, mdl_15_to_30, और mdl_30_to_45).

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

इंटरमीडिएट Regression with statsmodels in Python

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Print the coeff. of determination for mdl_all_ages
print("R-squared for mdl_all_ages: ", ____)

# Print the coeff. of determination for mdl_0_to_15
print("R-squared for mdl_0_to_15: ", ____)

# Print the coeff. of determination for mdl_15_to_30
print("R-squared for mdl_15_to_30: ", ____)

# Print the coeff. of determination for mdl_30_to_45
print("R-squared for mdl_30_to_45: ", ____)
कोड संपादित करें और चलाएँ