pyamr.core.regression.sarimax pyamr.core.regression.sarimax ============================= =============================
Classes
- class pyamr.core.regression.sarimax.SARIMAXWrapper(estimator=None, evaluate=True)[source]
Description
Methods:
as_summary
(**kwargs)This method creates a summary string.
auto
(endog[, exog, ic, max_ar, max_ma, ...])This method finds the best arima through bruteforce.
evaluate
([alpha])This method creates a dictioanry with the relevant parameters.
get_prediction
([start, end, alpha])This method calls the get prediction function in ARIMA.
load
(**kwargs)This method loads the information.
save
(**kwargs)This method saves the information.
- auto(endog, exog=None, ic='bic', max_ar=3, max_ma=3, max_d=1, max_P=0, max_D=0, max_Q=0, list_s=[12], warn='ignore', trends=['n', 'c', 't', 'ct'], return_fits=False, verbose=0, converged=True, **kwargs)[source]
This method finds the best arima through bruteforce.
Note: It uses grid search through the base wrapper.
- Parameters:
endog (array-like) – The endogenous variable (aka. time series data)
exog (array-like) – The exogenous variable (by default is the time t starting in 0)
ic (string) – The information criteria which should be any of the params which are set in the wrapper (see method _init_result).
max_ar (number) – The maximum autorregresive order to inspect.
max_ma (number) – The maximum moving average order to inspect.
max_d (number) – The maximum difference to inspect.
max_P (number)
max_D (number)
max_Q (number)
list_s (array-like)
warn (string, options = {ignore, raise}) – Whether or not to ignore the warnings raised
return_fits (bool) – Whether or not to return all the fits. If false only the best model is returned. If true all the models and the best model are returned separately.
converged (bool) – Whether or not to return only converging models. If false all models are returned. If true, only those models that converged are returned.
- evaluate(alpha=0.05)[source]
This method creates a dictioanry with the relevant parameters.
@see: statsmodels.Sarimax @see: statsmodels.SarimaxResults
- Parameters:
alpha (significance level)
- Returns:
dictionary
- Return type:
dictionary with the parameters.
- get_prediction(start=None, end=None, alpha=0.05, **kwargs)[source]
This method calls the get prediction function in ARIMA.
- Parameters:
start (int (optional)) – The time t to start the prediction
end (int (optional)) – The time t to end the prediction
dynamic (bool) – The dynamic keyword affects in-sample prediction. If dynamic is false then the in-sample lagged values are used for prediction. if dynamic is true, then in-sample forecasts are used in place of lagged dependent variables. The first forecasted value is start.
alpha (float) – The alpha value when creating the norm point percent function to compute the confidence intervals for the forecast predictions.
typ (string-like, options = {linear, levels}) – Wether to predict the original levels (levels) or predict in terms of the differenced endogenous variables.
- Return type:
matrix