loongson/pypi/: pmdarima-1.8.5 metadata and description

Homepage Simple index

Python's forecast::auto.arima equivalent

classifiers
  • Intended Audience :: Science/Research
  • Intended Audience :: Developers
  • Intended Audience :: Financial and Insurance Industry
  • Programming Language :: C
  • Programming Language :: Python
  • Topic :: Software Development
  • Topic :: Scientific/Engineering
  • Operating System :: Microsoft :: Windows
  • Operating System :: POSIX
  • Operating System :: Unix
  • Operating System :: MacOS
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: Implementation :: CPython
description_content_type text/markdown
download_url https://pypi.org/project/pmdarima/#files
keywords arima timeseries forecasting pyramid pmdarima pyramid-arima scikit-learn statsmodels
license MIT
maintainer Taylor G. Smith
maintainer_email taylor.smith@alkaline-ml.com
platform
  • UNKNOWN
project_urls
  • Bug Tracker, https://github.com/alkaline-ml/pmdarima/issues
  • Documentation, http://alkaline-ml.com/pmdarima
  • Source Code, https://github.com/alkaline-ml/pmdarima
requires_dist
  • joblib (>=0.11)
  • Cython (!=0.29.18,>=0.29)
  • numpy (>=1.19.3)
  • pandas (>=0.19)
  • scikit-learn (>=0.22)
  • scipy (>=1.3.2)
  • statsmodels (!=0.12.0,>=0.11)
  • urllib3
  • setuptools (!=50.0.0,>=38.6.0)
requires_python >=3.7

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
pmdarima-1.8.5-cp37-cp37m-linux_loongarch64.whl
Size
1 MB
Type
Python Wheel
Python
3.7
pmdarima-1.8.5-cp38-cp38-linux_loongarch64.whl
Size
2 MB
Type
Python Wheel
Python
3.8
  • Replaced 1 time(s)
  • Uploaded to loongson/pypi by loongson 2022-07-14 08:43:29
pmdarima-1.8.5-cp39-cp39-linux_loongarch64.whl
Size
2 MB
Type
Python Wheel
Python
3.9
  • Replaced 2 time(s)
  • Uploaded to loongson/pypi by loongson 2022-08-26 07:25:32
pmdarima-1.8.5-py3-none-any.whl
Size
6 KB
Type
Python Wheel
Python
3
  • Replaced 1 time(s)
  • Uploaded to loongson/pypi by loongson 2022-08-26 06:16:38
pmdarima-1.8.5.tar.gz
Size
627 KB
Type
Source
  • Replaced 3 time(s)
  • Uploaded to loongson/pypi by loongson 2022-08-26 07:25:35

pmdarima

PyPI version CircleCI Github Actions Status codecov Supported versions Downloads Downloads/Week

Pmdarima (originally pyramid-arima, for the anagram of 'py' + 'arima') is a statistical library designed to fill the void in Python's time series analysis capabilities. This includes:

Pmdarima wraps statsmodels under the hood, but is designed with an interface that's familiar to users coming from a scikit-learn background.

Installation

pip

Pmdarima has binary and source distributions for Windows, Mac and Linux (manylinux) on pypi under the package name pmdarima and can be downloaded via pip:

pip install pmdarima

conda

Pmdarima also has Mac and Linux builds available via conda and can be installed like so:

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install pmdarima

Note: We do not maintain our own Conda binaries, they are maintained at https://github.com/conda-forge/pmdarima-feedstock. See that repo for further documentation on working with Pmdarima on Conda.

Quickstart Examples

Fitting a simple auto-ARIMA on the wineind dataset:

import pmdarima as pm
from pmdarima.model_selection import train_test_split
import numpy as np
import matplotlib.pyplot as plt

# Load/split your data
y = pm.datasets.load_wineind()
train, test = train_test_split(y, train_size=150)

# Fit your model
model = pm.auto_arima(train, seasonal=True, m=12)

# make your forecasts
forecasts = model.predict(test.shape[0])  # predict N steps into the future

# Visualize the forecasts (blue=train, green=forecasts)
x = np.arange(y.shape[0])
plt.plot(x[:150], train, c='blue')
plt.plot(x[150:], forecasts, c='green')
plt.show()
Wineind example

Fitting a more complex pipeline on the sunspots dataset, serializing it, and then loading it from disk to make predictions:

import pmdarima as pm
from pmdarima.model_selection import train_test_split
from pmdarima.pipeline import Pipeline
from pmdarima.preprocessing import BoxCoxEndogTransformer
import pickle

# Load/split your data
y = pm.datasets.load_sunspots()
train, test = train_test_split(y, train_size=2700)

# Define and fit your pipeline
pipeline = Pipeline([
    ('boxcox', BoxCoxEndogTransformer(lmbda2=1e-6)),  # lmbda2 avoids negative values
    ('arima', pm.AutoARIMA(seasonal=True, m=12,
                           suppress_warnings=True,
                           trace=True))
])

pipeline.fit(train)

# Serialize your model just like you would in scikit:
with open('model.pkl', 'wb') as pkl:
    pickle.dump(pipeline, pkl)
    
# Load it and make predictions seamlessly:
with open('model.pkl', 'rb') as pkl:
    mod = pickle.load(pkl)
    print(mod.predict(15))
# [25.20580375 25.05573898 24.4263037  23.56766793 22.67463049 21.82231043
# 21.04061069 20.33693017 19.70906027 19.1509862  18.6555793  18.21577243
# 17.8250318  17.47750614 17.16803394]

Availability

pmdarima is available on PyPi in pre-built Wheel files for Python 3.7+ for the following platforms:

If a wheel doesn't exist for your platform, you can still pip install and it will build from the source distribution tarball, however you'll need cython>=0.29 and gcc (Mac/Linux) or MinGW (Windows) in order to build the package from source.

Note that legacy versions (<1.0.0) are available under the name "pyramid-arima" and can be pip installed via:

# Legacy warning:
$ pip install pyramid-arima
# python -c 'import pyramid;'

However, this is not recommended.

Documentation

All of your questions and more (including examples and guides) can be answered by the pmdarima documentation. If not, always feel free to file an issue.