Model.plot

In [ ]:
Model.plot(vdf=None,
           X: list = [],
           ts: str = "",
           X_idx: int = 0,
           dynamic: bool = False,
           one_step: bool = True,
           observed: bool = True,
           confidence: bool = True,
           nlead: int = 10,
           nlast: int = 0,
           limit: int = 1000,
           ax=None,
           **style_kwds,)

Draws the model.

Parameters

Name Type Optional Description
vdf
vDataFrame
Object to use to run the prediction.
X
list
List of the response columns.
ts
str
vcolumn used to order the data.
X_idx
int/str
Index of the main vector vcolumn to draw. It can also be the name of a predictor vcolumn.
dynamic
bool
If set to True, the dynamic forecast will be drawn.
one_step
bool
If set to True, the one step ahead forecast will be drawn.
observed
bool
If set to True, the observation will be drawn.
confidence
bool
If set to True, the confidence ranges will be drawn.
nlead
int
Number of predictions computed by the dynamic forecast after the last ts date.
nlast
int
The dynamic forecast will start nlast values before the last ts date.
limit
int
Maximum number of past elements to use.
ax
Matplotlib axes object
The axes to plot on.
**style_kwds
any
Any optional parameter to pass to the Matplotlib functions.

Returns

ax : Matplotlib axes object

Example

In [2]:
from verticapy.learn.tsa import VAR
model = VAR(name = "VAR_Texas",
            p = 5)
model.drop()
model.fit(input_relation = "Texas", 
          X = ["cases", "deaths"],
          ts = "date")
model.plot(X_idx = "cases",
           nlead = 100,
           nlast = 30,
           dynamic = True)
model.plot(X_idx = "deaths",
           nlead = 100,
           nlast = 30,
           dynamic = True,)
Out[2]:
<AxesSubplot:title={'center':'VAR(5) ["deaths"]'}, xlabel='"date"'>