Model.fit

In [ ]:
Model.fit(input_relation: (str, vDataFrame),
          y: str,
          ts: str,
          X: list = [],
          test_relation: (str, vDataFrame) = "")

Trains the model with a timeseries aggregate functions.

Parameters

Name Type Optional Description
input_relation
str / vDataFrame
❌
Training relation.
y
str
❌
Response column.
ts
str
❌
vcolumn used to order the data.
X
list
❌
exogenous columns used to fit the model.
test_relation
str / vDataFrame
✓
Relation to use to test the model.

Returns

object : self

Example

In [4]:
from verticapy.learn.tsa import SARIMAX
model = SARIMAX(name = "SARIMAX_amazon",
                s = 12,
                P = 4)
model.drop()
model.fit(input_relation = "amazon_clean",
          y = "number",
          ts = "date")
Out[4]:
=======
details
=======

# Coefficients

     predictor           coefficient  
1    Intercept      1189.09072535348  
2         ar12     0.287732289958669  
3         ar24     0.460957537018552  
4         ar36     0.367964853426529  
5         ar48    -0.122985720615148  
Rows: 1-5 | Columns: 2

===============
Additional Info
===============
Input Relation : amazon_clean
y : "number"
ts : "date"