Forecaster
IgnoreX
Compositor for ignoring exogenous variables.
Composing with IgnoreX instructs the wrapped forecaster to ignore exogenous data. This is useful for testing the impact of exogenous data on forecasts, or for use in tuning hyperparameters of the forecaster.
Quickstart
python
from sktime.forecasting.compose import IgnoreX
estimator = IgnoreX(forecaster, ignore_x=True)Tags
Capabilities
- Categorical features
- In-sample predictions: Supported
- In-sample prediction intervals: Supported
- Exogenous variables
- Prediction intervals: Not supported
- Missing values: Not supported
- Multivariate: Not supported
Properties
- Needs forecast horizon in fitrequires-fh-in-fit
- Yes
- X and y need the same indexX-y-must-have-same-index
- Yes
Parameters(2)
- forecastersktime forecaster, BaseForecaster descendant instance
- The forecaster to wrap.
- ignore_xbool, optional (default=True)
Whether to ignore exogenous data or not, this parameter is useful for tuning.
True: ignore exogenous data, X is not passed on to
forecasterFalse: use exogenous data, X is passed on to
forecaster
Examples
>>> from sktime.forecasting.compose import IgnoreX
>>> from sktime.forecasting.sarimax import SARIMAX
>>> from sktime.datasets import load_longley
>>> y, X = load_longley ()
>>> forecaster = IgnoreX (SARIMAX ())
>>> forecaster. fit (y, X = X, fh = [1, 2, 3 ]) IgnoreX(forecaster=SARIMAX())
>>> y_pred = forecaster. predict (X = X)