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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.22-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.22-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.22-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.22.tar.gz.

File metadata

  • Download URL: pylmrob-0.5.22.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.22.tar.gz
Algorithm Hash digest
SHA256 b6801997f79dea687aa5618b01c7b497ded6c5fbef4fe466b5a9c7eb09a69535
MD5 3557480a15292ed901059679b611e3d1
BLAKE2b-256 c10a13c322ac6bb0c63e05c202edb9e0718e491dd14019917e7e93efcdae370b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.22-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.22-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 eb615680e1e0214268dccdf88cee901c5e86427239e48eb9855a308274c0077c
MD5 c08f6a8433df39af2ea8c7236f703f47
BLAKE2b-256 52bdb629dc57016749f86e622b074a12d60b8b6cadbf1692ce106123e8047720

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.22-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.22-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.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d61dcbb2de4dcbacca4ed6062325b450ecc88d7b3393fc0978c260b20053c9a
MD5 9b5bcaef385b3896fb95260a76f9369f
BLAKE2b-256 fa6e20b06d9a473e4d941775b55965d28b60093e1fd23361dfc9862c4b6fe682

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5d3cda00ae578f47b6b6605b8e4d315233c073f30776b49a223e164404efcdd8
MD5 870caf805fab1b1966739265d94ab4c0
BLAKE2b-256 cb0a63fba6e0cf4a656c71fc9135cd543ef0d3f93fb1ea7c6fb7050d794b60be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 582c04482a9295c292c59ee4b1eb632d20748322dd9abae37d7ad2c67da29e50
MD5 6b3fceafbb58b977554bba0b1b6737b8
BLAKE2b-256 e0580c42a0d40754dbf3367775becb402ae3504a531cb67342744f97b5ec5798

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.22-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.22-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 727a5302c8b63dd59f0dc371f528b00286ae7e08237a7a9deb9ac8eeee9cf315
MD5 44a696ca6c62a519da3caa65276e4107
BLAKE2b-256 cc4d5c41cf7a6aee43090f30f9f58c5017af991c87fe68bdb3c91b019c55b44f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.22-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.22-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.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d361afa20b3161b2e6218d3e295e48f51be413c3cd8ef400dc5901d407173be9
MD5 f01f647c03bf84373f598b4019f8d6fa
BLAKE2b-256 eabc3f7b78233c188c07d45e7550fddaf3f6e328f5cca6753680e0a8a7c8ddff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 39bd3ac1c98b1513acdb3895d5d51c0591b6004516f597fb0b166dace4c8eb31
MD5 51d9e146fefd4d74cca964ee0fb7ed8b
BLAKE2b-256 3bde25a0c766938807a43ce48b20dedeb3abaf86f15e44f4498c4ddc0216f03e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 737001a60e10ba0a642a912a0a38d53009a393e5783c84d0664f242cb9a8576b
MD5 5bbfb10fd4719ffd315952ae33d638cb
BLAKE2b-256 ee81b418cdb3b373c85de201b8fcc3d38c29050a74b1ac15124550fea824388b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.22-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.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c22eb456fe08695d970a553d9db96e4501d307767bae6ca6da0f00f3e507fcb
MD5 1521c5c3a3538b4e0ac3b3142a51c1d7
BLAKE2b-256 fae049be6fcfccca411a211a8c9e656d0a54322fa9b9bed77db3a3fc8171dde2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.22-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.22-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.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b2093a3fd7f64ca6cd6f0df6141a42ad1b13cac03ec8bae2e7229ce34b8db740
MD5 3ec38cc7f6ff024f0815415da65b1275
BLAKE2b-256 628bd73e78d78e6a6d9073062108abd905f9f277e75d02b4c2b3bc4ff6cfcc5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a111ee5a8abc6d8b825a5999d327613557f53e12b2355ced6708dc71c74a8199
MD5 319c627d18acc14482afad9018911005
BLAKE2b-256 d79a5c0d955321b3474cf647e86f1caa214cbf9c9d638a007bd0342b60b78b60

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 30b2485d9fcf5bf086bbd6c9eaf16b03e6d9fd864fba279b1a2646abf249ec89
MD5 ac658ee34c278a2f419a3d39b064616e
BLAKE2b-256 48d470798cdd7a9a6b22a18b2b90e8ba491c5e939172d97973724ce079bef43b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.22-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.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8823fce71b1cbe8f2bd14954ece38fc51ea5be979525d13e394455dade77d00e
MD5 e4d8b1a9ae0b9fed8b28f2fcf0014de4
BLAKE2b-256 8bd299c506ce33eab01f5e5c15295e1a0c6604205181f0bf6ac24659d1edfcee

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.22-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.22-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.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82462418b6babcccb446c1ec738cf17c28f69a1d046d891e2eab42525d8c7a60
MD5 f7c5f32ab3bccbecc1bad277c7f88d46
BLAKE2b-256 10922860164c47fab11bfdf4ad16e0f719602f499574891d3f40469fcfa83410

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6a9ab9dd026d9ef348eee3fb156127c68d050120c7e4d3a17faccd5134797b97
MD5 7b5c975976a7a227eb01f3a390326967
BLAKE2b-256 072f444d1412132594f63a8d7ad9fe0f546cdf17eb939b3600a13e8fac56e9d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.22-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bfb63161c9486b0abfc29a826cf006fe712657238e9244f3d10b3740f8a776d6
MD5 7d0d22bb0d14ff34ad591bd90a611853
BLAKE2b-256 f5ed0fc2500b417927633187a44ca1c4e5c3f46386a7e0a9e7117e17af2d9ceb

See more details on using hashes here.

Provenance

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