Model.features_importance

In [ ]:
Model.features_importance(X_idx: int = 0, 
                          ax=None, 
                          show: bool = True, 
                          **style_kwds,)

Computes the importance of the features of the model with time series aggregate functions.

Parameters

Name Type Optional Description
X_idx
int/str
Index of the main vector vcolumn used to draw the features importance. It can also be the name of a predictor vcolumn.
ax
Matplotlib axes object
The axes to plot on.
show
bool
If set to True, draw the features importance.
**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 [3]:
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.features_importance(X_idx = "cases",)
Out[3]:
importance
sign
ar0_152.902785312704621
ar0_216.454702499250395-1
ar0_34.8760316464138411
ar0_47.202416172229613-1
ar0_54.0933587394546911
ar1_11.2110964911996867-1
ar1_20.241963274597203931
ar1_33.2234640965754604-1
ar1_44.671230101818453-1
ar1_55.1229516657560481
Rows: 1-10 | Columns: 3