Skip to main content
pmdarima-rs

CI PyPI Python License

A drop-in replacement for pmdarima — the same auto_arima, the same ARIMA, the same arguments and the same selected orders, with the Kalman filter rewritten in Rust.


Install

pip install pmdarima-rs

Prebuilt wheels for Linux, macOS and Windows, Python 3.10 through 3.14 from a single abi3 wheel per platform. No compiler needed, no Rust toolchain needed.

Switch

Change one import.

- import pmdarima as pm
+ import pmdarima_rs as pm

That is the whole migration. If you cannot edit the code that imports pmdarima — someone else's library, a notebook you were handed, a vendored script — alias it instead.

Use it

Everything works the way it does in pmdarima, because it is the same API.

import pmdarima_rs as pm

y = pm.datasets.load_wineind()
model = pm.auto_arima(y, seasonal=True, m=12, trace=True)

forecast, ci = model.predict(n_periods=12, return_conf_int=True)
print(model.summary())
auto_arima searching 21 candidate models on the wineind dataset and finishing in 0.7 seconds wineind observed series and a 24-period forecast with a 95% interval

The summary() table is statsmodels' own layout, and every figure in it — coefficients, standard errors, information criteria, the Ljung-Box and Jarque-Bera block — is checked against statsmodels in the test suite.

See the full summary output SARIMAX results table

Speed

auto_arima speedup by dataset, 8.9x to 29.5x, same order selected on all ten
workload pmdarima pmdarima-rs
auto_arima on all 10 bundled datasets 58.7 s 3.7 s 16.0×, 10/10 identical orders
fitting 6 known specifications 6.94 s 0.35 s 20.0×, identical AIC
40 seasonal series, one model each 17.2 min 1.8 min 9.6×
one likelihood evaluation 0.7–25 ms 0.02–3.7 ms 5.4× – 39.6×

Every row is checked for agreement before it is timed, so a fast wrong answer cannot appear in the table. pmdarima's filter is already compiled — it is Cython — so this is not "Python versus native"; the wins are algorithmic, and docs/DESIGN.md says what they are.

These are one machine's numbers and they are noisy: repeat runs move the totals by 15–20% and individual rows by more. What holds across runs is the order of magnitude and the agreement. Every measurement, and how to reproduce it, is in docs/BENCHMARKS.md.

Accuracy

The claim is not "similar results".

what agreement
loglikelihood, 120 fuzzed specifications worst relative error 1.7e-9
loglikelihood on series containing NaN 1e-10
SARIMAX.start_params, 27 specifications exact
ADF / KPSS / PP / CH / OCSB / ndiffs / nsdiffs 1,920 checks, 0 mismatches
auto_arima order on the 10 real datasets 10/10 identical

The tests are differential, not golden-file: they run pmdarima and this package on the same input and compare. Where the two genuinely differ — three places where we are more accurate, and a handful where a hard threshold makes the choice a coin flip — it is measured and written down in docs/CORRECTNESS.md rather than smoothed over.

For code you cannot edit

import pmdarima_rs
pmdarima_rs.install()      # before the first `import pmdarima`

import pmdarima            # now resolves to pmdarima_rs

install() puts a finder on sys.meta_path, so every submodule resolves too, including ones nothing has imported yet: import pmdarima.arima.utils or from pmdarima.datasets.wineind import load_wineind gets the very same module object this package exposes. isinstance checks and pickles therefore still work across the alias.

One attribute is deliberately not passed through: pmdarima.__version__ reports the pmdarima API level this package implements (2.1.1), because the code you cannot edit is exactly the code likely to gate on it. This package's own version stays available as pmdarima.__pmdarima_rs_version__ and as pmdarima_rs.__version__.

What is included

All of it. A test reads pmdarima's own __all__ for each module and fails on any name this package does not provide.

Models ARIMA, AutoARIMA, auto_arima, StepwiseContext, Pipeline
Unit-root / seasonality ADFTest, KPSSTest, PPTest, CHTest, OCSBTest, ndiffs, nsdiffs
Preprocessing FourierFeaturizer, BoxCoxEndogTransformer, LogEndogTransformer, DateFeaturizer
Model selection RollingForecastCV, SlidingWindowForecastCV, cross_val_score, cross_val_predict, cross_validate, train_test_split
Utils acf, pacf, diff, diff_inv, c, decompose, tsdisplay, plot_acf, plot_pacf, autocorr_plot
Datasets all 11 — wineind, airpassengers, ausbeer, austres, heartrate, lynx, woolyrnq, sunspots, taylor, gasoline, msft

The estimators are real scikit-learn estimators when scikit-learn is installed, and use a local fallback base when it is not — so clone, get_params, set_output and metadata routing all work, without making scikit-learn a dependency.

Dependencies

Three, against pmdarima's eight.

pmdarima pmdarima-rs
required numpy, pandas, scipy, statsmodels, scikit-learn, joblib, Cython, setuptools numpy, pandas, scipy
optional — matplotlib ([plot]), scikit-learn

matplotlib is imported lazily inside the plotting helpers, so it only has to be there if you call them.

Limitations

  • method accepts the same nine solver names statsmodels does and rejects anything else with the same ValueError, but only 'lbfgs' is implemented; the other eight warn and fall back to it. It is pmdarima's default and the only one its own auto_arima uses.
  • Five SARIMAX options raise NotImplementedError rather than being accepted and quietly ignored: simple_differencing, measurement_error, time_varying_regression, mle_regression=False and use_exact_diffuse. Each of them changes the model, so honouring the argument by ignoring it would report a different model's numbers under your specification. Every other SARIMAX keyword is either implemented or genuinely makes no difference to the likelihood, and an unrecognised one is a TypeError, as it is in statsmodels.
  • Order selection agrees with pmdarima on real data (10/10) but can differ on series whose fitted MA roots sit on auto_arima's 0.99 rejection threshold, where two optimisers agreeing to nine digits still land on opposite sides of a hard cutoff. It is measured in the benchmark rather than asserted away; details in docs/CORRECTNESS.md.
  • The stationary initial covariance is solved by squaring, which is far cheaper than the k² × k² factorisation it replaces but is still the largest fixed cost per likelihood evaluation — roughly a sixth of a seasonal call at m = 12. An O(r²) recursion using the ARMA autocovariances would remove most of that; it is the clearest remaining headroom and is not implemented.

Development

git clone https://github.com/Fatin-Ishraq/pmdarima-rs
cd pmdarima-rs
pip install maturin
maturin develop --release

pip install "pmdarima>=2.1.1" statsmodels pytest   # the reference to test against
pytest tests/ -q
cargo test --lib
python bench/bench.py

The test suite skips its differential tests when pmdarima is not installed, so it still runs without the reference — it just checks less.

Documentation

Licence

MIT. pmdarima is MIT (Taylor G. Smith and contributors); statsmodels is BSD-3. Portions of this package are ports of both, as noted in the module docstrings.

Metadata

Release files for pmdarima-rs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pmdarima-rs 0.1.0
File Size Uploaded
pmdarima_rs-0.1.0.tar.gz 375.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pmdarima-rs 0.1.0
File
pmdarima_rs-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
pmdarima_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
pmdarima_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 3.1 MB

Release files / pmdarima_rs-0.1.0.tar.gz

Download URL pmdarima_rs-0.1.0.tar.gz
Size 375.4 kB
Tags Source
SHA-256 checksum
How to use checksums
495943863060d9b1f11ef89d43343caeae0466d396190af9a72d28280da1a4af
BLAKE2b-256 checksum
How to use checksums
632d7cf4f44cf0399c4cebb2d2263c20e19d2e9811ce0120b8fcbd8e00558e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / pmdarima_rs-0.1.0-cp310-abi3-win_amd64.whl

Download URL pmdarima_rs-0.1.0-cp310-abi3-win_amd64.whl
Size 463.7 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6bc12996eff4d75e2a4790f9008533c27765b8cefc0df0d8e4363715e7181cc2
BLAKE2b-256 checksum
How to use checksums
c91d6cbb724b66bff9cd29243dcc07bfeebbe3d18c569948714442e485af3301
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 580.0 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9ec2bf2125a575b85caf0ddd8ab89065abf73f54f540614acd1cc457233845eb
BLAKE2b-256 checksum
How to use checksums
18858524c4334e82068091e325f956874da8ddf699fd7bf4ec567675eea6fffa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pmdarima_rs-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 571.8 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
7666c1ea3e6357ddb88a4d1cf9f8d6584bbe9fe7dccf2bafb4dfe3408f47f31c
BLAKE2b-256 checksum
How to use checksums
cdd1d9f2310a375644e90d92b4e18f0ff4b49a416b999188b35ac6694b3c3b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / pmdarima_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL pmdarima_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 542.0 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f80fc1484f8b7de0addac62a11c65ded7f1b99bb71549d1c9b9113f4025d2dbb
BLAKE2b-256 checksum
How to use checksums
4239712f9918a735b275a98d9e783aea0a0a4c3f35bf905256cf5d0bd326d7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / pmdarima_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL pmdarima_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 556.4 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1bb85d03c177858e09d5cf425d164413f6add962e6f0c3d37bb486f55dff65f4
BLAKE2b-256 checksum
How to use checksums
7d869d9a14de04f6f92a4db7667e5357ba92ebea9fba8c141e92519b7d5ea755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page