欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python實(shí)現(xiàn)時(shí)間序列自相關(guān)圖(acf)、偏自相關(guān)圖(pacf)教程

 更新時(shí)間:2020年06月03日 11:44:44   作者:DD-Kylin  
這篇文章主要介紹了python實(shí)現(xiàn)時(shí)間序列自相關(guān)圖(acf)、偏自相關(guān)圖(pacf)教程,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧

自相關(guān)圖是一個(gè)平面二維坐標(biāo)懸垂線圖。橫坐標(biāo)表示延遲階數(shù),縱坐標(biāo)表示自相關(guān)系數(shù)

偏自相關(guān)圖跟自相關(guān)圖類(lèi)似, 橫坐標(biāo)表示延遲階數(shù),縱坐標(biāo)表示偏自相關(guān)系數(shù)

自相關(guān)圖與偏自相關(guān)圖的python代碼實(shí)現(xiàn):

from statsmodels.graphics.tsaplots import plot_acf, plot_pacf

plot_acf(b.salesVolume)
plot_pacf(b.salesVolume)

可以看到,這個(gè)數(shù)據(jù)是偏自相關(guān)系數(shù)拖尾,自相關(guān)系數(shù)截尾的數(shù)據(jù)

補(bǔ)充知識(shí):python 數(shù)據(jù)相關(guān)性可視化

話不多說(shuō)直接上代碼

import matplotlib.pyplot as plt
import seaborn as sns

data = test_feature.corr() #test_feature => pandas.DataFrame#
sns.heatmap(data)
plt.show()

效果圖

以上這篇python實(shí)現(xiàn)時(shí)間序列自相關(guān)圖(acf)、偏自相關(guān)圖(pacf)教程就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論