smooth.ES.predict
- ES.predict(h, X=None, calculate_intervals=True, interval_method='parametric', level=0.95, side='both', nsim=10000)
Generate point forecasts using the fitted ADAM model.
If calculate_intervals is True, prediction intervals are also computed and stored in self._forecast_results but only point forecasts are returned by this method. Use predict_intervals to get the intervals directly.
- 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.
calculate_intervals (bool, default=True) – Whether to calculate prediction intervals along with point forecasts. The intervals are stored in self._forecast_results.
interval_method (Optional[Literal['parametric', 'simulation', 'bootstrap']],) – default=’parametric’ Method to calculate prediction intervals: - ‘parametric’: Assumes a known distribution for errors. - ‘simulation’: Simulates future paths to derive intervals. - ‘bootstrap’: Uses bootstrapping techniques. This parameter is used if calculate_intervals is True.
level (Optional[Union[float, List[float]]], default=0.95) – Confidence level(s) for prediction intervals (e.g., 0.95 for 95% interval, or [0.8, 0.95] for 80% and 95% intervals). Used if calculate_intervals is True.
side (Literal['both', 'upper', 'lower'], default='both') – Which side(s) of the intervals to compute: - ‘both’: Both lower and upper bounds. - ‘lower’: Only the lower bound. - ‘upper’: Only the upper bound. Used if calculate_intervals is True.
nsim (int, default=10000) – Number of simulations to run for simulation-based intervals. Only used when interval_method=’simulation’.
- Returns:
Point forecasts for the next h periods.
- Return type:
NDArray
- Raises:
ValueError – If the model has not been fitted yet or h is not set.
Parent Class: ES