smooth.ADAM.predict

ADAM.predict(h, X=None, interval='none', level=0.95, side='both', cumulative=False, nsim=10000, occurrence=None, scenarios=False, seed=None)

Generate forecasts using the fitted ADAM model.

Parameters:
  • h (int) – Forecast horizon (number of steps to forecast).

  • X (Optional[NDArray]) – Exogenous variables for the forecast period. Ensure that X covers the entire forecast horizon h.

  • interval (Literal['none', 'prediction', 'simulated', 'approximate', 'semiparametric', 'nonparametric', 'empirical', 'confidence', 'complete']) –

    Type of prediction interval to construct:

    • "none": No intervals, point forecasts only.

    • "prediction": Automatically selects "simulated" or "approximate" depending on the model type.

    • "simulated": Simulation-based intervals (Monte Carlo).

    • "approximate": Analytical (parametric) intervals.

    • "semiparametric": Not yet implemented.

    • "nonparametric": Not yet implemented.

    • "empirical": Not yet implemented.

    • "confidence": Not yet implemented.

    • "complete": Not yet implemented.

  • level (Union[float, List[float], None]) –

    Confidence level(s) for prediction intervals. Accepts a single value (e.g. 0.95) or a list for multiple simultaneous levels (e.g. [0.9, 0.95, 0.99]). Values above 1 are treated as percentages and divided by 100.

    Each level produces a pair of lower_X / upper_X columns in the output, where X is the corresponding quantile. For example, level=0.95 with side="both" yields columns "lower_0.025" and "upper_0.975".

  • side (Literal['both', 'upper', 'lower']) –

    Which side(s) of the intervals to compute:

    • "both": Both lower and upper bounds (default).

    • "upper": Upper bound only. Column named "upper_<level>".

    • "lower": Lower bound only. Column named "lower_<1-level>".

  • cumulative (bool) – If True, return cumulative (summed) forecasts over the horizon.

  • nsim (int) – Number of simulations for simulation-based intervals.

  • occurrence (Optional[NDArray]) – External occurrence probabilities for the forecast period. Overrides the fitted model’s occurrence for forecasting.

  • scenarios (bool) – If True and interval="simulated", store the raw simulation matrix in self._general["_scenarios_matrix"].

  • seed (Optional[int]) – Seed forwarded to reforecast() when interval is "complete" or "confidence". Pins the Monte-Carlo paths so the interval is reproducible across runs and platforms. Ignored for the other interval modes.

Returns:

Structured result with .mean (pd.Series), .lower and .upper (pd.DataFrame or None), .level, .side, and .interval attributes. Use .to_dataframe() for a flat pd.DataFrame.

Return type:

NDArray

Raises:

ValueError – If the model has not been fitted yet or h is not set.


Parent Class: ADAM