API Reference

This is the class and function reference for pyramid. 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.

pyramid.arima: ARIMA estimator & differencing tests

The pyramid.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.CHTest(m) Conduct a CH test for seasonality.
arima.KPSSTest([alpha, null, lshort]) Conduct a KPSS test for stationarity.
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.

pyramid.datasets: Toy univariate timeseries datasets

The pyramid.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_heartrate([as_series]) Uniform heart-rate data.
datasets.load_lynx([as_series]) Annual numbers of lynx trappings for 1821–1934 in Canada.
datasets.load_wineind([as_series]) Australian total wine sales by wine makers in bottles <= 1 litre.

pyramid.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.