smooth.ADAM.predict
- ADAM.predict(h, X=None, interval='none', level=0.95, side='both', cumulative=False, nsim=10000, occurrence=None, scenarios=False)
Generate forecasts using the fitted ADAM model.
Matches R’s
forecast.adam()interface for interval types and additional parameters.- Parameters:
h (int) – Forecast horizon (number of steps to forecast).
X (Optional[NDArray], default=None) – Exogenous variables for the forecast period. Ensure that X covers the entire forecast horizon
h.interval (str, default="none") –
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 (float or list of float, default=0.95) –
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_Xcolumns in the output, where X is the corresponding quantile. For example,level=0.95withside="both"yields columns"lower_0.025"and"upper_0.975".side (str, default="both") –
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, default=False) – If True, return cumulative (summed) forecasts over the horizon.
nsim (int, default=10000) – Number of simulations for simulation-based intervals.
occurrence (Optional[NDArray], default=None) – External occurrence probabilities for the forecast period. Overrides the fitted model’s occurrence for forecasting.
scenarios (bool, default=False) – If True and
interval="simulated", store the raw simulation matrix inself._forecast_results["scenarios"].
- Returns:
DataFrame with
"mean"column and optional interval columns.- Return type:
pd.DataFrame
- Raises:
ValueError – If the model has not been fitted yet or
his not set.
Parent Class: ADAM