pylmrob
Python port of the lmrob MM-estimator from R's
robustbase package.
Coefficient agreement with R on the classical validation datasets is within
rtol=1e-3 for both estimates and covariance; see
docs/numerical-notes.md for known divergences
and docs/bench-report.md for wall-clock numbers.
Status: alpha. Public API is provisional.
Note: parts of the documentation were drafted with help from Claude Opus 4.7. Verify against the source code or the cited papers before relying on them.
Install
pip install pylmrob
From source (requires Python 3.10+ and a C compiler):
git clone https://github.com/anevolbap/pyrobustlm
cd pyrobustlm
uv pip install --no-build-isolation -e ".[dev]"
pytest
Quickstart
import pandas as pd
from pylmrob import lmrob, Control
df = pd.read_csv("stackloss.csv")
fit = lmrob(
"stack.loss ~ Air.Flow + Water.Temp + Acid.Conc.",
df,
control=Control(setting="KS2014"),
seed=42,
)
print(fit.summary())
More: docs/quickstart.md,
docs/examples/,
docs/porting-from-r.md.
Comparison with statsmodels
statsmodels.robust.RLM
implements M-estimators (Huber, Tukey, Hampel) but not MM-estimators. If you
need MM (high breakdown + high efficiency), use pylmrob. If plain M is
enough, RLM has a more mature API.
Contributing
See CONTRIBUTING.md for the dev setup, test layout, and
PR guidelines.
References
- Yohai, V. J. (1987). High Breakdown-Point and High Efficiency Robust Estimates for Regression. Annals of Statistics, 15(2). doi:10.1214/aos/1176350366.
- Salibian-Barrera, M. and Yohai, V. J. (2006). A Fast Algorithm for S-Regression Estimates. JCGS, 15(2). doi:10.1198/106186006X113629.
- Koller, M. and Stahel, W. A. (2011). Sharpening Wald-type Inference in Robust Regression for Small Samples. CSDA, 55(8). doi:10.1016/j.csda.2011.02.014.
- Koller, M. and Stahel, W. A. (2017). Nonsingular Subsampling for Regression S-estimators with Categorical Predictors. Computational Statistics, 32(2). doi:10.1007/s00180-016-0679-x.
- Maronna, R. A. and Yohai, V. J. (2000). Robust regression with both continuous and categorical predictors. JSPI, 89(1-2). doi:10.1016/S0378-3758(99)00208-6.
License and citation
GPL-3.0-or-later, matching robustbase. See LICENSE and
NOTICE. Citation metadata in CITATION.cff
(GitHub renders a "Cite this repository" button).
Metadata
Release files for pylmrob 0.5.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylmrob-0.5.27.tar.gz | 11.4 MB | With provenance | Details for pylmrob-0.5.27.tar.gz |
Built distributions (wheels)
Total release size: 21.2 MB
Release files / pylmrob-0.5.27.tar.gz
| Download URL | pylmrob-0.5.27.tar.gz |
|---|---|
| Size | 11.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c9841e952c8883f9cf06b1edb94113ae72073f85320571448cdb2077abc5d4a
|
|
BLAKE2b-256 checksum How to use checksums |
9c59d1567b57d862795adfdf7d85cd70acfda79be06b72107b0c6ad6c3055563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp313-cp313-win_amd64.whl
| Download URL | pylmrob-0.5.27-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 622.5 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ad6939919b48c5f698dc9750c4ac8a209b73138c8b639942f5455e05f92bc44c
|
|
BLAKE2b-256 checksum How to use checksums |
b9a1d30f1616d176255deadfb8ef3e390553b049cab08785dc568a62b41183eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylmrob-0.5.27-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 695.9 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
49334bbf0531fa1c79de642f4dada5bbe9a3c6bc7278271cbc9730496a79ad32
|
|
BLAKE2b-256 checksum How to use checksums |
9557bd4b52ec94ba1b42d7db17c290d8d58294a2fc7dd37b8759e4b5ef09b84b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylmrob-0.5.27-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 671.3 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
ae2affff0535a71cce4a7be7d55d6a0f71bad5dd0dc2ea3e6641c032d2b8eb87
|
|
BLAKE2b-256 checksum How to use checksums |
7dc98f9e7ed5e89c7732b240b642fa5b596fde90116ca20cd3dc561a7884ec71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pylmrob-0.5.27-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 436.4 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4e7382771b735f802bced1b2352c5bf069f86fe9e678a285998de79a7ec357aa
|
|
BLAKE2b-256 checksum How to use checksums |
422dc0827950d3341c2ab164aca43bc8ae63a4163a6687507b5d99e2f2755a31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp312-cp312-win_amd64.whl
| Download URL | pylmrob-0.5.27-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 623.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3b78c137fa8d2c3bbcb14cd926c0450c14b0faa412a1a191b60c996df7edfdc5
|
|
BLAKE2b-256 checksum How to use checksums |
26c65b066484a8321ad10ce97a05b97735c26791bd1d1c5d1b14b49cb6111996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylmrob-0.5.27-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 693.3 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
af13d25bf7b6c892473425f354ecf539ac105a5d674229caaea30a8826d65d5d
|
|
BLAKE2b-256 checksum How to use checksums |
a4d817a371c586137575ea3edfb6d025426fe64871d758b773db6e8b0c3753a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylmrob-0.5.27-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 672.0 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1304d69d560249e1c78ae448b17a58421aaf991d62c74c58b4c5cdfe9833f9f2
|
|
BLAKE2b-256 checksum How to use checksums |
668b05ff69879181720a1b08cdb165ede58193bb24bef36f0e05ef518b4a7210
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pylmrob-0.5.27-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 438.4 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b648bc5147f00319ab768c5ecc513a40ea5a1c5f25e76cc81a4233c24bd3e48c
|
|
BLAKE2b-256 checksum How to use checksums |
5d82e2cc98e4fc6271dd2f5986d5b7600746b6c2503273f50ba8fd2d5b9be114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp311-cp311-win_amd64.whl
| Download URL | pylmrob-0.5.27-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 626.9 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3e60f811c9980a4865e014ab8631de493277e7373e0b3ca0a7aeaa96c0168431
|
|
BLAKE2b-256 checksum How to use checksums |
41c349dc3a379f53125c9561b96b53a35671ec365542c1f69633c2028dd6fcfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylmrob-0.5.27-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 701.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d60140b4ab6c9dfba8b638584ed62bf072da809e0562be4180539b0beca75b1b
|
|
BLAKE2b-256 checksum How to use checksums |
cd90a6642c42a4bc3deb304d3ad2ce2823cd83289050b43e0a305e09e5f6bb65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylmrob-0.5.27-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 680.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
515bcefcb75a10d8ba345b82abdec451041da554a5b5e2b1b3af8624ed39f7a9
|
|
BLAKE2b-256 checksum How to use checksums |
402b52f8c0746d5f62b42c0822c4447c05ecf065e398f25b30526f89b53c7f83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pylmrob-0.5.27-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 437.1 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
016996533249615e57f6e30bc27c2def4d1983104545f0c7cb624596f0507804
|
|
BLAKE2b-256 checksum How to use checksums |
a7fa8351556581f3682e63295120b8811d64e5f7ce73b1e69c8b807e63d32895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp310-cp310-win_amd64.whl
| Download URL | pylmrob-0.5.27-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 626.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
431858f42a77f2d75d237d7f48ff2852612bfb614cea9d1a30a42d9863bac78a
|
|
BLAKE2b-256 checksum How to use checksums |
c213aa1e8c8dc0af43808b85465203f4633901a888d1450e418bd046aa9b54b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylmrob-0.5.27-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 702.5 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b4de0e1a5c4e9fbbdd8218dfce0b819fad3f367b35dc1e52c0cc568e6ce74a15
|
|
BLAKE2b-256 checksum How to use checksums |
fc78e160920ce207989dcfc99fa64ff4c5c47265b68a4efc27453ecad8dc2732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pylmrob-0.5.27-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 680.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
4ec73500e685bd665da2b480c78900d0dcaa9ce6b4ac20942969f771cfe5b2ae
|
|
BLAKE2b-256 checksum How to use checksums |
f0998cda49b6d3801debc4989f8a6fadca62e78d4f54c43fba804b9b66a97a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logRelease files / pylmrob-0.5.27-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pylmrob-0.5.27-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 439.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2a1f083efaa2476a74368bba68463a3d4ddf58f3547429e3611457b847ff57a9
|
|
BLAKE2b-256 checksum How to use checksums |
3158b68e6f80538d64b0e4380ded4ebd46f3b6d13a22c1330ce1cf1bb77d874a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 28, 2026.
Transparency logSecurity for pylmrob 0.5.27
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.
Full provenance
All 17 files in this release have been uploaded with provenance metadata.
Attestation for pylmrob-0.5.27.tar.gz
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 Jul 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.