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

Uploaded CPython 3.13Windows x86-64

pylmrob-0.5.24-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.24-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.24-cp313-cp313-macosx_11_0_arm64.whl (430.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.24-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.24-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.24-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.24.tar.gz.

File metadata

  • Download URL: pylmrob-0.5.24.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.24.tar.gz
Algorithm Hash digest
SHA256 c4353aa52d79a0d4d5a0af69ba8c7a36a4cdcd254bd2d5a3b4ad7a005416ed03
MD5 e814a8f066b1b06172f6a4095b4612ab
BLAKE2b-256 860349ecc7ac7609463f26e2b16f2ec1e3c3583fe5b1b2e947ac98b0966d6c41

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.24-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.24-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9e08e64f253ff5314fdfd8ca31ac05749afe38e18b23204238c5e815c59e03bf
MD5 d04400e9a1628b85879aefe7b0766463
BLAKE2b-256 b352b0d2720898c09cedef29af19205a08eb759ef6efabe1042c0e47ebfbc433

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.24-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.24-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.24-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f8b3b89f0616ead832e33323ac51f73730dc5eb26fc66c7fcdccbd3a6aa3703
MD5 1d4c0a36b2312d4fa5bba17fefe4913a
BLAKE2b-256 0457a02f6b4ed3e5c31e2e366e3a40ffe7c97038fa1482e8b6f03c4ce997809d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4c62970a808839d4c80359c06e85e5cba170d9814269dafaa4594f707e4fd6eb
MD5 aeaca06f82981a03f8b076f7b1f0c0a9
BLAKE2b-256 d310e52f773c588324eb08d0919e5683cabd87da9f954daa87d8d40b9e780383

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f835a757d86ae11401cf2dde2a29d9e469c828ee045515d3033a7dc26dacbb63
MD5 621f4f318fb8fbbec828c2472d60c2f7
BLAKE2b-256 84cd9b4524cb73973957d9c420117d478c622302d2bed39e3ce44ab4acfa1522

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.24-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.24-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9c32958fdc808cb49617d0f0501c2a9a536f312923a65887f3b50bba1b1dc7dd
MD5 a43f7ab15db28b80eb763e260d1e441b
BLAKE2b-256 fa2a280b9023ca29ecf4b31c07ba42db23dd2846b680175445a88f6672eeadb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.24-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.24-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.24-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f9ed463b2d8722f5959fad1b1f03981c5b2b471108748fafd449d7b816b68eae
MD5 482c5749cbd620ee858145823d8e78c9
BLAKE2b-256 d7e16e83584dfc2492bb36d672bfb4f4cbd3ddf03b26d02bab7d612848d160fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd1682e73805feaccea6e62eb3e410f5ed92661abde27216c2848ff94a54c1ce
MD5 c30c781e17ddead3ba8d18d522b3f002
BLAKE2b-256 5c77f53ce32cf45979ec494338e7e94dc8c9ae715520ecfe3927552af28fea7c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81d0ad6a9fbf210b537543be698e8b0d31da4c25bd7c6cc453a4c52c726016a3
MD5 7f01893160cfc67f62308247dd62354d
BLAKE2b-256 cb08d045b47593eb47f8972794fb09ff2e8f3a3b7d8208f6e70001bd05c5db48

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.24-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.24-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9da6f63293eb95891bc8e99fc48234e196fb72a2d5e9dbbe935d8d20fae84830
MD5 f476fdfadfae502d420326af9d94d36e
BLAKE2b-256 3f6f62cb43416b59f13cfd0f3d8df8355d5a71372f4c12d614095ef847ae2c32

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.24-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.24-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.24-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06595f78e0b7296326e1ee1b4893960552361ff07113fc581064e478d3ddfbd5
MD5 a2aad8c510b6622a3babf01d5c80dcec
BLAKE2b-256 28554f14602c17ef2bc793c62b73b9ca2ef41630db8474a9ea9d76db4bf32084

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 34b2c406c5800c25adaac784f823e755cfad374b447be63895d8311672f1087c
MD5 290aa8d43aa23c520fe76c2c1e576b06
BLAKE2b-256 9a4270a6276e9ec18bb58a259becb7da3651fc0e4ce4e16b66855e06e7e65522

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53a0f729fcbd6ab2501fd90f0474c4236ecb4f839e782d503901991970be0a2c
MD5 67143fa672b648656b00e065893cb5db
BLAKE2b-256 44ced660aa02e949a391612ea8113dc64dfcc6f577c3fce780cec5d7671dea76

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.24-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.24-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba74f19fa4cf311438acb04ecbbf8f4ab374beb25067b99ab09a94c425f56249
MD5 933a68ad4b0b99f8b6fdb80f073a11ed
BLAKE2b-256 865d102127bfb32718108e4466e9cd890736f04ac07169adf2e26168b72c99af

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.24-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.24-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.24-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af8e8f9b286e1f24280564a12d5f4cddaf7432b3fb764f6be8122e140c6c21e5
MD5 44e4efc558184254b990443fabdf63d4
BLAKE2b-256 5b431152875944cbcde6b63cfe805b5153a53516fdea655da695b466db8dd457

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0574756cef0e855a3ddf8c4f843755bf6bf4be7321d09964306c2b5d63e6fbe2
MD5 f2ac15b5c6b4c39de94cc851710306d5
BLAKE2b-256 030b51c52f892ee9f96ec9078fbf58241614430df2b6f10c66289c0ce4b638d7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f7b7872b9f8676bd9e842513ea7a52e53d71c0c25c38af9ed5935c96e7639221
MD5 8ece6fcb64101e1b083456101e3065ea
BLAKE2b-256 59b380dcd76852e84de8cf1dea60c2cc2626b0a4d327c3bdbc90ed936b016b11

See more details on using hashes here.

Provenance

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