module statsforecast.arima
function arima_gradtrans
function arima_undopars
function ARIMA_invtrans
function getQ0
function arima_transpar
function arima_css
function make_arima
function arima_like
function diff
function fixed_params_from_dict
fixed_dict(dict): Dictionary of fixed parameters.order(tuple): ARIMA order (p, d, q).seasonal(dict): Seasonal parameters.intercept(bool): Whether to include intercept.n_ex(int): Number of external variables.
list: List of parameter values.
function arima
function kalman_forecast
function checkarima
function predict_arima
function convert_coef_name
function change_drift_name
function myarima
function search_arima
function arima2
function Arima
function arima_string
function is_constant
function forecast_arima
function fitted_arima
model: The fitted ARIMA model.h(int): Number of steps ahead. Defaults to 1.
function seas_heuristic
function nsdiffs
function ndiffs
function newmodel
function auto_arima_f
function forward_arima
function print_statsforecast_ARIMA
class OptimResult
OptimResult(success, status, x, fun, hess_inv)
class ARIMASummary
ARIMA Summary.
method __init__
method summary
class AutoARIMA
An AutoARIMA estimator.
Returns best ARIMA model according to either AIC, AICc or BIC value. The function conducts a search over possible model within the order constraints provided.
Args:
d(int, optional): Order of first-differencing. If missing, will choose a value based ontest. Defaults to None.D(int, optional): Order of seasonal-differencing. If missing, will choose a value based onseason_test. Defaults to None.max_p(int): Maximum value of p. Defaults to 5.max_q(int): Maximum value of q. Defaults to 5.max_P(int): Maximum value of P. Defaults to 2.max_Q(int): Maximum value of Q. Defaults to 2.max_order(int): Maximum value of p+q+P+Q if model selection is not stepwise. Defaults to 5.max_d(int): Maximum number of non-seasonal differences. Defaults to 2.max_D(int): Maximum number of seasonal differences. Defaults to 1.start_p(int): Starting value of p in stepwise procedure. Defaults to 2.start_q(int): Starting value of q in stepwise procedure. Defaults to 2.start_P(int): Starting value of P in stepwise procedure. Defaults to 1.start_Q(int): Starting value of Q in stepwise procedure. Defaults to 1.stationary(bool): If True, restricts search to stationary models. Defaults to False.seasonal(bool): If False, restricts search to non-seasonal models. Defaults to True.ic(str): Information criterion to be used in model selection. Defaults to ‘aicc’.stepwise(bool): If True, will do stepwise selection (faster). Otherwise, it searches over all models. Non-stepwise selection can be very slow, especially for seasonal models. Defaults to True.nmodels(int): Maximum number of models considered in the stepwise search. Defaults to 94.trace(bool): If True, the list of ARIMA models considered will be reported. Defaults to False.approximation(bool, optional): If True, estimation is via conditional sums of squares and the information criteria used for model selection are approximated. The final model is still computed using maximum likelihood estimation. Approximation should be used for long time series or a high seasonal period to avoid excessive computation times. Defaults to None.method(str, optional): fitting method: maximum likelihood or minimize conditional sum-of-squares. The default (unless there are missing values) is to use conditional-sum-of-squares to find starting values, then maximum likelihood. Can be abbreviated. Defaults to None.truncate(bool, optional): An integer value indicating how many observations to use in model selection. The last truncate values of the series are used to select a model when truncate is not None and approximation=True. All observations are used if either truncate=None or approximation=False. Defaults to None.test(str): Type of unit root test to use. See ndiffs for details. Defaults to ‘kpss’.test_kwargs(str, optional): Additional arguments to be passed to the unit root test. Defaults to None.seasonal_test(str): This determines which method is used to select the number of seasonal differences. The default method is to use a measure of seasonal strength computed from an STL decomposition. Other possibilities involve seasonal unit root tests. Defaults to ‘seas’.seasonal_test_kwargs(dict, optional): Additional arguments to be passed to the seasonal unit root test. See nsdiffs for details. Defaults to None.allowdrift(bool): If True, models with drift terms are considered. Defaults to True.allowmean(bool): If True, models with a non-zero mean are considered. Defaults to True.blambda(float, optional): Box-Cox transformation parameter. If lambda=“auto”, then a transformation is automatically selected using BoxCox.lambda. The transformation is ignored if None. Otherwise, data transformed before model is estimated. Defaults to None.biasadj(bool): Use adjusted back-transformed mean for Box-Cox transformations. If transformed data is used to produce forecasts and fitted values, a regular back transformation will result in median forecasts. If biasadj is True, an adjustment will be made to produce mean forecasts and fitted values. Defaults to False.period(int): Number of observations per unit of time. For example 24 for Hourly data. Defaults to 1.
- This implementation is a mirror of Hyndman’s forecast::auto.arima. References: [1] https://github.com/robjhyndman/forecast
method __init__
method fit
y and optionally exogenous variables (numpy array) X.
Args:
y(np.ndarray): One-dimensional numpy array of floats withoutnp.nanornp.infvalues.X(np.ndarray, optional): An optional 2-d numpy array of exogenous variables (float). Defaults to None.
method predict
h(int): Number of periods for forecasting.X(np.ndarray, optional): Future exogenous variables. Defaults to None.level(int or tuple of int, optional): Confidence level for prediction intervals. Defaults to None.
pd.DataFrame: The array of fitted values. The confidence intervals for the forecasts are returned if level is not None.
method predict_in_sample
level(int or tuple of int, optional): Confidence level for prediction intervals. Defaults to None.
pd.DataFrame: The array of fitted values. The confidence intervals for the forecasts are returned if level is not None.

