API Reference

This is the class and function reference for pmdarima. Please refer to the full user guide for further details, as the class and function raw specifications may not be enough to give full guidelines on their uses.

pmdarima.arima: ARIMA estimator & differencing tests

The pmdarima.arima sub-module defines the ARIMA estimator and the auto_arima function, as well as a set of tests of seasonality and stationarity.

ARIMA estimator & statistical tests

User guide: See the Estimating the seasonal differencing term, D and Enforcing stationarity sections for further details.

arima.ADFTest([alpha, k]) Conduct an ADF test for stationarity.
arima.ARIMA(order[, seasonal_order, …]) An ARIMA estimator.
arima.AutoARIMA([start_p, d, start_q, …]) Automatically discover the optimal order for an ARIMA model.
arima.CHTest(m) Conduct a CH test for seasonality.
arima.KPSSTest([alpha, null, lshort]) Conduct a KPSS test for stationarity.
arima.OCSBTest(m[, lag_method, max_lag]) Perform an OCSB test of seasonality.
arima.PPTest([alpha, lshort]) Conduct a PP test for stationarity.

ARIMA auto-parameter selection

User guide: See the Tips to using auto_arima section for further details.

arima.auto_arima(y[, exogenous, start_p, d, …]) Automatically discover the optimal order for an ARIMA model.

Differencing helpers

arima.is_constant(x) Test x for constancy.
arima.ndiffs(x[, alpha, test, max_d]) Estimate ARIMA differencing term, d.
arima.nsdiffs(x, m[, max_D, test]) Estimate the seasonal differencing term, D.

pmdarima.datasets: Toy timeseries datasets

The pmdarima.datasets submodule provides several different univariate time- series datasets used in various examples and tests across the package. If you would like to prototype a model, this is a good place to find easy-to-access data.

User guide: See the Toy time-series datasets section for further details.

Dataset loading functions

datasets.load_airpassengers([as_series]) Monthly airline passengers.
datasets.load_austres([as_series]) Quarterly residential data.
datasets.load_heartrate([as_series]) Uniform heart-rate data.
datasets.load_lynx([as_series]) Annual numbers of lynx trappings for 1821–1934 in Canada.
datasets.load_msft() Load the microsoft stock data
datasets.load_wineind([as_series]) Australian total wine sales by wine makers in bottles <= 1 litre.
datasets.load_woolyrnq([as_series]) Quarterly production of woollen yarn in Australia.

pmdarima.metrics: Time-series metrics

The metrics submodule implements time-series metrics that are not implemented in scikit-learn.


metrics.smape(y_true, y_pred) Compute the Symmetric Mean Absolute Percentage Error.

pmdarima.pipeline: Pipelining transformers & ARIMAs

With the pipeline.Pipeline class, we can pipeline transformers together and into a final ARIMA stage.


pipeline.Pipeline(steps) A pipeline of transformers with an optional final estimator stage

pmdarima.preprocessing: Preprocessing transformers

The pmdarima.preprocessing submodule provides a number of transformer classes for pre-processing time series or exogenous arrays.

Endogenous transformers

preprocessing.BoxCoxEndogTransformer([…]) Apply the Box-Cox transformation to an endogenous array

Exogenous transformers

preprocessing.FourierFeaturizer(m[, k]) Fourier terms for modeling seasonality

pmdarima.utils: Utilities

Utilities and array differencing functions used commonly across the package.

Array helper functions & metaestimators

utils.acf(x[, unbiased, nlags, qstat, fft, …]) Autocorrelation function for 1d arrays.
utils.as_series(x) Cast as pandas Series.
utils.c(*args) Imitates the c function from R.
utils.diff(x[, lag, differences]) Difference an array.
utils.if_has_delegate(delegate) Wrap a delegated instance attribute function.
utils.is_iterable(x) Test a variable for iterability.
utils.pacf(x[, nlags, method, alpha]) Partial autocorrelation estimated

Plotting utilities & wrappers

utils.autocorr_plot(series[, show]) Plot a series’ auto-correlation.
utils.plot_acf(series[, ax, lags, alpha, …]) Plot a series’ auto-correlation as a line plot.
utils.plot_pacf(series[, ax, lags, alpha, …]) Plot a series’ partial auto-correlation as a line plot.