plot_acf_pacf

In [ ]:
plot_acf_pacf(vdf, 
              column: str, 
              ts: str, 
              by: list = [], 
              p=15,
              **style_kwds,)

Draws ACF and PACF Charts.

Parameters

Name Type Optional Description
vdf
vDataFrame
Input vDataFrame.
column
str
Input vcolumn to test.
ts
str
vcolumn used as timeline. It will be to use to order the data. It can be a numerical or type date like (date, datetime, timestamp...) vcolumn.
by
list
vcolumns used in the partition.
p
int/list
Int: the maximum number of lag to consider during the computation or List: the lags to include in the computation. p must be positive or a list of positive integers.
**style_kwds
any
Any optional parameter to pass to the Matplotlib functions.

Returns

tablesample : An object containing the result. For more information, see utilities.tablesample.

Example

In [2]:
from verticapy import *
amazon = vDataFrame("amazon_clean")
amazon["number"].plot(ts = "date")
Out[2]:
<AxesSubplot:xlabel='"date"', ylabel='"number"'>
In [3]:
from verticapy.learn.model_selection import plot_acf_pacf
plot_acf_pacf(amazon,
              column = "number",
              ts = "date",
              p = 40)
Out[3]:
acf
pacf
confidence
01.01.00.12677953091477834
10.6810.6807919434785590.17635811053763534
20.224-0.4486517606020.19431587020757393
3-0.106-0.0568109385115240.19499672195507936
4-0.321-0.2140725725654210.19920783402950884
5-0.421-0.1322753791800030.2010667082835581
6-0.444-0.2092715153991610.2050497710828973
7-0.425-0.220860052264010.20938483891715812
8-0.322-0.1153815124226390.21088997523164352
9-0.12-0.03038976767026760.21142090542967368
100.1860.1959400578119360.21490010161856163
110.5580.4210968546954670.22882273960076843
120.7860.3540856008911830.23839868796477467
130.582-0.2775394542721640.24434402010546982
140.184-0.04666198735622560.24503815910113524
15-0.129-0.02521793604808650.24562891469251005
16-0.323-0.02086273566748780.24620949094162303
17-0.422-0.07389250384646020.2471459776695441
18-0.445-0.02771521681516830.24775839671186387
19-0.424-0.05701391118809270.24854931191055846
20-0.324-0.03590624735329430.249206893259297
21-0.1150.03689265328445790.2498738171394671
220.2150.1835170898442330.2528182062297603
230.6030.2904065042048870.259254137753213
240.8120.1487488985613340.26137328696950884
250.574-0.2528485514180730.26632779888317776
260.164-0.02076911177012250.2669813898197994
27-0.1340.03531408562741430.26769474980282326
28-0.33-0.09210542572965450.2689033274675358
29-0.4250.01543551783576860.2695589819239978
30-0.447-0.03902146242639030.27030664827764966
31-0.432-0.03619061302176910.27104490437804446
32-0.339-0.04764840015573260.27185384167555543
33-0.146-0.01909156284863090.2725378227507441
340.155-0.04482758045506250.27333953753511986
350.5730.3117500359435250.2806082427371645
360.8040.04339320169858290.28142518911642866
370.579-0.1158793097989460.2830246303006458
380.172-0.01348822910904130.28374005275607883
39-0.1250.03044522333557770.2845111009329001
40-0.328-0.08502784555008170.2857139410476577
Rows: 1-41 | Columns: 4