Seasonality और रुझान

Python में IoT डेटा का विश्लेषण

Matthias Voppichler

IT Developer

टाइम सीरीज़ के घटक

  • रुझान
  • मौसमी
  • अवशिष्ट / शोर
series[t] = trend[t] + seasonal[t] + residual[t]
20.2 = 14.9 + 4.39 + 0.91
Python में IoT डेटा का विश्लेषण

Seasonal decompose

import statsmodels.api as sm
# Run seasonal decompose
decomp = sm.tsa.seasonal_decompose(data["temperature"])
print(decomp.seasonal.head())

decomp.plot()
timestamp
2018-10-01 00:00:00   -3.670394
2018-10-01 01:00:00   -3.987451
2018-10-01 02:00:00   -4.372217
2018-10-01 03:00:00   -4.534066
2018-10-01 04:00:00   -4.802165
Freq: H, Name: temperature, dtype: float64
Python में IoT डेटा का विश्लेषण

Seasonal decompose

मौसमी विघटन प्लॉट

Python में IoT डेटा का विश्लेषण

संयुक्त प्लॉट

# Plot the timeseries
plt.plot(data["temperature"], label="temperature")

decomp = sm.tsa.seasonal_decompose(data["temperature"]) # Plot trend and seasonality plt.plot(decomp.trend, label="trend") plt.plot(decomp.seasonal, label="seasonal") plt.show()
Python में IoT डेटा का विश्लेषण

संयुक्त प्लॉट

मौसमी विघटन - संयुक्त प्लॉट

Python में IoT डेटा का विश्लेषण

अभ्यास करते हैं!

Python में IoT डेटा का विश्लेषण

Preparing Video For Download...