| forecaster |
(ForecasterRecursive, ForecasterDirect, ForecasterEquivalentDate) |
Forecaster model. |
required |
| y |
pd.Series |
Training time series. |
required |
| cv |
TimeSeriesFold |
TimeSeriesFold object with the information needed to split the data into folds. |
required |
| metric |
str | Callable | list |
Metric used to quantify the goodness of fit of the model. - If str: {‘mean_squared_error’, ‘mean_absolute_error’, ‘mean_absolute_percentage_error’, ‘mean_squared_log_error’, ‘mean_absolute_scaled_error’, ‘root_mean_squared_scaled_error’} - If Callable: Function with arguments y_true, y_pred and y_train (Optional) that returns a float. - If list: List containing multiple strings and/or Callables. |
required |
| exog |
pd.Series | pd.DataFrame |
Exogenous variable/s included as predictor/s. Must have the same number of observations as y and should be aligned so that y[i] is regressed on exog[i]. Defaults to None. |
None |
| interval |
float | list | tuple | str | object |
Specifies whether probabilistic predictions should be estimated and the method to use. The following options are supported: - If float, represents the nominal (expected) coverage (between 0 and 1). For instance, interval=0.95 corresponds to [2.5, 97.5] percentiles. - If list or tuple: Sequence of percentiles to compute, each value must be between 0 and 100 inclusive. For example, a 95% confidence interval can be specified as interval = [2.5, 97.5] or multiple percentiles (e.g. 10, 50 and 90) as interval = [10, 50, 90]. - If ‘bootstrapping’ (str): n_boot bootstrapping predictions will be generated. - If scipy.stats distribution object, the distribution parameters will be estimated for each prediction. - If None, no probabilistic predictions are estimated. Defaults to None. |
None |
| interval_method |
str |
Technique used to estimate prediction intervals. Available options: - ‘bootstrapping’: Bootstrapping is used to generate prediction intervals. - ‘conformal’: Employs the conformal prediction split method for interval estimation. Defaults to ‘bootstrapping’. |
'bootstrapping' |
| n_boot |
int |
Number of bootstrapping iterations to perform when estimating prediction intervals. Defaults to 250. |
250 |
| use_in_sample_residuals |
bool |
If True, residuals from the training data are used as proxy of prediction error to create predictions. If False, out of sample residuals (calibration) are used. Out-of-sample residuals must be precomputed using Forecaster’s set_out_sample_residuals() method. Defaults to True. |
True |
| use_binned_residuals |
bool |
If True, residuals are selected based on the predicted values (binned selection). If False, residuals are selected randomly. Defaults to True. |
True |
| random_state |
int |
Seed for the random number generator to ensure reproducibility. Defaults to 123. |
123 |
| return_predictors |
bool |
If True, the predictors used to make the predictions are also returned. Defaults to False. |
False |
| n_jobs |
int | str |
The number of jobs to run in parallel. If -1, then the number of jobs is set to the number of cores. If ‘auto’, n_jobs is set using the function skforecast.utils.select_n_jobs_backtesting. Defaults to ‘auto’. |
'auto' |
| verbose |
bool |
Print number of folds and index of training and validation sets used for backtesting. Defaults to False. |
False |
| show_progress |
bool |
Whether to show a progress bar. Defaults to True. |
True |
| suppress_warnings |
bool |
If True, spotforecast warnings will be suppressed during the backtesting process. See spotforecast.exceptions.warn_skforecast_categories for more information. Defaults to False. |
False |