Skip to main content

Python port of robustbase::lmrob (MM regression)

Project description

pylmrob

CI PyPI Python versions Documentation Status License: GPL-3.0-or-later

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylmrob-0.5.21.tar.gz (11.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pylmrob-0.5.21-cp313-cp313-win_amd64.whl (614.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pylmrob-0.5.21-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (689.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylmrob-0.5.21-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (664.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pylmrob-0.5.21-cp313-cp313-macosx_11_0_arm64.whl (430.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylmrob-0.5.21-cp312-cp312-win_amd64.whl (616.4 kB view details)

Uploaded CPython 3.12Windows x86-64

pylmrob-0.5.21-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (689.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylmrob-0.5.21-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (665.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pylmrob-0.5.21-cp312-cp312-macosx_11_0_arm64.whl (432.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylmrob-0.5.21-cp311-cp311-win_amd64.whl (620.8 kB view details)

Uploaded CPython 3.11Windows x86-64

pylmrob-0.5.21-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (694.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylmrob-0.5.21-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (674.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pylmrob-0.5.21-cp311-cp311-macosx_11_0_arm64.whl (431.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylmrob-0.5.21-cp310-cp310-win_amd64.whl (620.2 kB view details)

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.21-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (695.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylmrob-0.5.21-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (673.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pylmrob-0.5.21-cp310-cp310-macosx_11_0_arm64.whl (433.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pylmrob-0.5.21.tar.gz.

File metadata

  • Download URL: pylmrob-0.5.21.tar.gz
  • Upload date:
  • Size: 11.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylmrob-0.5.21.tar.gz
Algorithm Hash digest
SHA256 7705bbcfa3166e4a97d29a11872df05ee68ad57f9c7727af400fcf64ce14e854
MD5 42bc2593558bf548949bcf72f0f2fd6a
BLAKE2b-256 0f50f278e3d0ac270d0c98421c258e8a697391ef6d18f4ecade9a7a95ec81120

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21.tar.gz:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.21-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 614.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylmrob-0.5.21-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f4d68574adca58764948877d78e017b5529ae2068a19000dc1a03ab2c05f6779
MD5 481861bdf553c4d6cd9b877531cc239f
BLAKE2b-256 2cf12620fa3ce1c5b3ae712d2ed566e35ebaedfe53620dec1a1f04676659921e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bff07f73eebd55c439475ef6f670b0a1f9480ca08064ca7ed6e34599af81e8ec
MD5 710d20a9e211f9038801976774f32e1f
BLAKE2b-256 909f57a76779c93ec1d998e36cf71ab92785f075b643bb490fd9798cc7eefb40

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a58c162eccfefb2f96cdaf6b36f4c6869b14dcbb85fe17e0be95b3a18d0e8e6b
MD5 09570e0471214f97b0060280b56b7f9d
BLAKE2b-256 95e3f1c13a29162f93bc867960e7999da0a6aa19c36d2ccde2c53f53d396fa14

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3931dbc4c119d397948e44351672cfca97509113089d1200decb287ba339bff4
MD5 c795f7fc0f32d2dae5eb70b7497ed2d1
BLAKE2b-256 9dec590a94e5daabbeb210c93ecf0a944811c1f57e57a0a93add2da346d7c2d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.21-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 616.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylmrob-0.5.21-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bb4f65752d3b54846bd9e32d0a6c65280286cdcb612cb9278b4ec1e753233f7d
MD5 ab889b7248d9fb3c0b785fa97699010d
BLAKE2b-256 68d4d6b8134e5e0aa858d85aad1dd3356e32d615c381c08325f20c4ad971734a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05dcbebec42665255a98f2e4945b94a0dd4cd014f3aa196fb8651dc420ebd092
MD5 2eaf990714c1bceb13267cc3e9d8de91
BLAKE2b-256 102524904586b37b6a3454c2ceacf92749daac7a57d54ed99a3251842e72f1ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6a5111e3dc20e0bb52e0ac2508ffd9a48fce8326b139e72c7802904ea91f2b9a
MD5 32dc6d96708093e40930070dd4a19294
BLAKE2b-256 cdffb1eec3e9d7ea2b861107fe8b4480bce9eff4f91a198a9067a9083c282f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3ed5ebb5ee7f8c204d22eb8ae828298c82fb9d969b99de9d3f50c4380a5d137
MD5 8327b51fc47cfbbd55b494ad0e00fb51
BLAKE2b-256 300e4372cd1cbce0d3ccdd2e4b5a4e8ddccb88cd6d646e1c010e141944be4299

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.21-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 620.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylmrob-0.5.21-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8bb6bb86983610f8a68ab58a8771ec48983624882c42171e602f423cbb15a4c0
MD5 6df756412b71ced1578e1ad81a6e2c99
BLAKE2b-256 846cfad7fc3f9a818e4b081429d525abc90a97beed2ae6968d05747966c9b734

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2cb8b821c12afafccd6a6badb3ae06b6fec342c1075da98ecc6b230bd5bb39a
MD5 e10901c199e4bd45c6e3f8aeba6e8560
BLAKE2b-256 64fcf62a52949ecac5c90f1d7124117d257043ca32cf2293564bbd36bf0ddd74

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d0e0affc170ec3a303073f41c33a812b5f3d1dfa1f1f5f78a1642b5fdeddd627
MD5 82834ed48ccfa070a1d2cd8fb2dd8e4b
BLAKE2b-256 d3a88e8100a13b3324389607661553aa6847228cc0de3e1c10f20935eb0979cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6845e30183c6d1504d3db58a2014ff1416052e6609f17561b38a13f89d8ffa0f
MD5 d741a7a6319ee9bc48817c37bc4f634a
BLAKE2b-256 796e74df8370bffdc2be07e96601a9044f2d8e5563e6a0511879f1f2d5b8bf63

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.21-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 620.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylmrob-0.5.21-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d23606c1aec0f6b9e855cb6016cd5d0c4c635ba9bdd9f57eb70c6b6e8a678d69
MD5 4da18e871ad1d50c199c6ca55217987b
BLAKE2b-256 75455584d11e745b4bc59dcb70679aabf5513e0e02555906417db563296effd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26379f9cd8a545cc910210e6182ea938046e15fcf8178843e9065679031201ed
MD5 5d11f6fe659d7d1996feeef4174693ba
BLAKE2b-256 3dbf8c20c49081d4317a018e42cb5d091209cf8af67883b388c9cd8af428e0fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ee468913c9dc35a5b135885e3cae30f1585532d41754ba2451a84c259c01ac81
MD5 335f3ad5b86e12407d6578371945b6dc
BLAKE2b-256 b379bbe576419ad21cf54860e6df506e08d646b0fdddf9b53a195a9b86791803

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylmrob-0.5.21-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.21-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1dc74baf96d0cc33b83f7ba9135588f22a5cf8f9afb3e65546d9420e88caf42e
MD5 5f2917086370d163745ae0eeeca93d57
BLAKE2b-256 46f813b66f73d840f77ab89df788885db9028d35710d92eac014788f1166f253

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.21-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on anevolbap/pyrobustlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page