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.23.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.23-cp313-cp313-win_amd64.whl (614.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pylmrob-0.5.23-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.23-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (664.5 kB view details)

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

pylmrob-0.5.23-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.23-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.23-cp312-cp312-macosx_11_0_arm64.whl (432.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

pylmrob-0.5.23-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.23-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.23-cp311-cp311-macosx_11_0_arm64.whl (431.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.23-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.23-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.23-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.23.tar.gz.

File metadata

  • Download URL: pylmrob-0.5.23.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.23.tar.gz
Algorithm Hash digest
SHA256 b5118d24cac3afd51a06ec8059da7fd6ced0a1131c15c72b8d6d9e609fb0807c
MD5 cdf6cde25562f778bb4079fbd6399dab
BLAKE2b-256 7a44f800075cedf48910ffd13914e68f56f0c1af4f5c9b367f82ace5bcc027db

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23.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.23-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.23-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.23-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 16ae9ac22304c4489c02427bab5dab69155be1fb6693729934a29dcd52c74ea9
MD5 46b0cecf52a92c33db745b3d805646e8
BLAKE2b-256 0bd674eea82addb3b7654160f3777da6235088a2ebbe88af38f2865ad77a7436

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-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.23-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e82d81bf93fdd3272a300c7466f67ca1f634c1d59b51b459780fb0a3a4af97b
MD5 806a27a688bb3f1466fdf85f8bfc1095
BLAKE2b-256 11c43fec020111416feb9670c54463d8ce9b528d5099b90e4ef75f19412068d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9bd638b698c8dd9b49687c43b14f5721ecd9a2c6386d7c497a35ec1926eef5b6
MD5 8e5c3fcd4b6aae19ccffcb1f7e3cb84f
BLAKE2b-256 7517decf0caefc52bdd848d021aea946b4351612bd83ac62b940b89f3e181a60

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52b10f51acc37eb4014ce9a8afb7fc16df19263a4b20d6f5daab8a346f4ee68d
MD5 56acd2bc3f9ac00cc06414d6488a3164
BLAKE2b-256 6b5c925c5516d1af41f7c5ad9aed0a0eac850dba5d160b8b619ea0fc4e7e179e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.23-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.23-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9f82d7f2c03c0f68a82a4d55f7a9f72c5611a8168fbcebfbba31f52e8ac4611c
MD5 f8b6380cf14e8e778e362240345e99f7
BLAKE2b-256 a583e6db52ef5506567422485031a5e64be1d5955cbaf8fa53246b5730635a24

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-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.23-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bb66478f7d3fa5b58b5ac6ceafa6c422901583d11baea2447787658144482841
MD5 dc6eb7357427e5a7bcafc4926255ae64
BLAKE2b-256 f00851aa4063e83e1f9951cee4b76408f87702225c5ebc0745c7ed45056854b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce3427bda1acb66ff4307858fc3f1648dcfc531787b25cafba748e55b9e046de
MD5 3045ca28764d464661e60c5158bf1e99
BLAKE2b-256 56383c43881921d1ffce358b57871b99db79d892691d9866c203456ed5fef005

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9561b49e9a865eb1bef0967cc13319c284ccb0276aad4266884df99d530c22ef
MD5 245dd8f133e7a8762900bde623eb002c
BLAKE2b-256 64244db8f06508d357a1f3be7ab7d42e92db90bfc92cbe118892a636ef2e408e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.23-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.23-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 20db7c0302ad50014cdfac1a35e10f53a48416fcd0c9f831213de9a72f33f57a
MD5 4845c2712892081242aa31699e34326e
BLAKE2b-256 1f10e7b877e2f9952ef18d94a2f65c77acb0d3d243fc386a3d7cd92fd03dcdc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-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.23-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b3881e59690bbcf9166698e9ba429870f816fced1ffd5c546df10c5c3405ec49
MD5 88340ae0bb1245b7c39b9b21aa16a073
BLAKE2b-256 71a0963927e99e5c570be354c14a5635a8964c8ced7a2fc3e26e85c8fd23680b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e0d330735ec7be260ae24e0683d415570bfee3e3451cf1ef4a796242b79aebaa
MD5 8de1f2d85d319e77aa27ed91e985fd44
BLAKE2b-256 a6ad1a8a83de0072a5ebf48f4e422b559e04bfa5caf9500ca96133ba39323d05

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a667bdd0f592801f40c9c66ed228d5b931c03989e2f5b1264cbc432bb9a887d0
MD5 b4f57af44eb11fe7a76fc2b711abc217
BLAKE2b-256 b1a21ef08f4d77effdeceaa178175c82231efada5a37868c80586f712787399c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pylmrob-0.5.23-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.23-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e7dbe3bfb1666842751979c1fbd75035c484c5f4e3d84fc614cbcfe6d64e9f98
MD5 33d93272707ac704ae00e4e23f9108d8
BLAKE2b-256 63eb4a4f249cc167103095b74e2dd861cc4a79150de9f748e461ff8bf204a89f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-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.23-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5f2f7a9ed884b7b104e5223bd54b1e8ea482bcf778f0a917ab0b155a55716c7
MD5 fcadbee54e571c9725b5e6c8d134b28a
BLAKE2b-256 c015b300165aa8f121d87628f666fa5f438ffd30a12b9f29066086a9d812e2f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9019bcc13348f0322b5949e4131979674970278fb0f4d26541404c2d2c8fc542
MD5 2f60b318f90d6dc047acdb1c850d5dd1
BLAKE2b-256 81abd5fe5cddff4e83b3427603519da24bda98cfca26f352336529b9a276abec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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.23-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.23-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f0696260baadefa575e350886a5913e4ac68c7064a42c5258a2d93a9dbfba351
MD5 3c1300ccb9e2855c384856cdf55bb13b
BLAKE2b-256 58b731fdf2d6fbaa914acdd2c21a41854761329374261633da67c724efbfdc42

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.23-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