अलग-अलग घटकों का प्लॉट बनाएँ
आप अपने time-series decomposition ऑब्जेक्ट से अन्य अनुमानित मात्राएँ भी निकाल सकते हैं। नीचे दिया गया कोड दिखाता है कि observed, trend और noise (या residual, resid) घटकों को कैसे निकाला जाए.
observed = decomposition.observed
trend = decomposition.trend
residuals = decomposition.resid
इसके बाद आप निकाले गए घटकों का उपयोग करके उन्हें अलग-अलग प्लॉट कर सकते हैं.
पिछले अभ्यास में आपने जो decomposition ऑब्जेक्ट बनाया था, वह आपके वर्कस्पेस में उपलब्ध है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में Time Series Data का विज़ुअलाइज़ेशन
अभ्यास निर्देश
decompositionऑब्जेक्ट सेtrendघटक निकालें.- इस trend घटक का प्लॉट बनाएँ.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Extract the trend component
trend = ____.____
# Plot the values of the trend
ax = ____.____(figsize=(12, 6), fontsize=6)
# Specify axis labels
ax.set_xlabel('Date', fontsize=10)
ax.set_title('Seasonal component the CO2 time-series', fontsize=10)
plt.show()