การแสดงภาพข้อมูล Time Series ด้วย Python
Thomas Vincent
Head of Data Science, Getty Images
t_1, t_2, t_3, ...) กับค่าที่ lag ไป 3 จุด คือ (t_4, t_5, t_6, ...)
statsmodelsคือโมดูล Python ที่มีคลาสและฟังก์ชันสำหรับการประมาณโมเดลทางสถิติหลายประเภท รวมถึงการทดสอบทางสถิติและการสำรวจข้อมูลทางสถิติ
import matplotlib.pyplot as plt
from statsmodels.graphics import tsaplots
fig = tsaplots.plot_acf(co2_levels['co2'], lags=40)
plt.show()

order 3 คือค่าสหสัมพันธ์ระหว่างอนุกรมเวลา (t1, t2, t3, ...) กับค่าที่ lag ไป 3 จุด (t4, t5, t6, ...) หลังจากนำผลกระทบของ lag 1 และ 2 ออกแล้วimport matplotlib.pyplot as plt
from statsmodels.graphics import tsaplots
fig = tsaplots.plot_pacf(co2_levels['co2'], lags=40)
plt.show()

การแสดงภาพข้อมูล Time Series ด้วย Python