ForecastResult#

class impulso.results.ForecastResult(*, idata, steps, var_names, mode='density')[source]#

Bases: VARResultBase

Result from VAR forecasting.

Parameters:
  • idata (InferenceData)

  • steps (int)

  • var_names (list[str])

  • mode (str)

idata#

ArviZ InferenceData with forecast draws.

steps#

Number of forecast steps.

Type:

int

var_names#

Names of forecasted variables.

Type:

list[str]

mode#

"density" or "mean" — which forecast mode produced this result.

Type:

str

hdi(prob=0.89)[source]#

HDI for forecast.

Parameters:

prob (float)

Return type:

HDIResult

median()[source]#

Posterior median forecast.

Return type:

DataFrame

model_config = {'arbitrary_types_allowed': True, 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plot()[source]#

Plot forecast fan chart.

Return type:

Figure

to_dataframe()[source]#

Convert to long-format DataFrame.

Return type:

DataFrame