Cumulative gains curve बनाना
Cumulative gains curve एक evaluation curve है जो आपके मॉडल के प्रदर्शन का आकलन करती है. यह दिखाती है कि आपकी population के उस निश्चित प्रतिशत पर विचार करने पर, जिन्हें आपका मॉडल target होने की सबसे अधिक संभावना देता है, कितने प्रतिशत targets हासिल होते हैं.
इस curve को बनाने के लिए, आप scikitplot मॉड्यूल की .plot_cumulative_gain() मेथड और matplotlib.pyplot मॉड्यूल का उपयोग कर सकते हैं. जैसे हर मॉडल evaluation metric या curve के लिए होता है, cumulative gains curve बनाने के लिए भी एक तरफ true target values और दूसरी तरफ predictions की आवश्यकता होती है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में प्रिडिक्टिव एनालिटिक्स परिचय
अभ्यास निर्देश
matplotlib.pyplotमॉड्यूल इम्पोर्ट करें.scikitplotमॉड्यूल इम्पोर्ट करें.- Cumulative gains curve बनाइए, यह मानते हुए कि मॉडल
predictions_testमें values आउटपुट करता है और true target valuestargets_testमें हैं.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Import the matplotlib.pyplot module
import ____.____ as plt
# Import the scikitplot module
import ____ as skplt
# Plot the cumulative gains graph
skplt.metrics.____(targets_test, ____)
plt.show()