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.

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

Uploaded CPython 3.13Windows x86-64

pylmrob-0.5.19-cp313-cp313-manylinux_2_28_x86_64.whl (680.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pylmrob-0.5.19-cp313-cp313-manylinux_2_28_aarch64.whl (641.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pylmrob-0.5.19-cp313-cp313-macosx_11_0_arm64.whl (430.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylmrob-0.5.19-cp312-cp312-win_amd64.whl (613.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pylmrob-0.5.19-cp312-cp312-manylinux_2_28_x86_64.whl (677.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pylmrob-0.5.19-cp312-cp312-manylinux_2_28_aarch64.whl (641.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pylmrob-0.5.19-cp312-cp312-macosx_11_0_arm64.whl (432.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylmrob-0.5.19-cp311-cp311-win_amd64.whl (619.5 kB view details)

Uploaded CPython 3.11Windows x86-64

pylmrob-0.5.19-cp311-cp311-manylinux_2_28_x86_64.whl (686.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pylmrob-0.5.19-cp311-cp311-manylinux_2_28_aarch64.whl (654.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pylmrob-0.5.19-cp311-cp311-macosx_11_0_arm64.whl (431.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylmrob-0.5.19-cp310-cp310-win_amd64.whl (620.5 kB view details)

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.19-cp310-cp310-manylinux_2_28_x86_64.whl (686.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pylmrob-0.5.19-cp310-cp310-manylinux_2_28_aarch64.whl (654.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

pylmrob-0.5.19-cp310-cp310-macosx_11_0_arm64.whl (433.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pylmrob-0.5.19.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.19.tar.gz
Algorithm Hash digest
SHA256 f9d820b907b5bbf3f23d3a96f2bbb788de80d56d5fe047221749237c5f106885
MD5 76ded3801750bf81d6c9d9a89a86724b
BLAKE2b-256 5979636d34ade17556e6615ace8af994be45e5b223177fc41a01b2f556b9a872

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.19-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 612.9 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.19-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3368286809e0c14aee125732ec4d74c5f50ba01a0fa127102e0548f957ef3f62
MD5 c0eda290349d576be04c2b67e3217a54
BLAKE2b-256 766813e08175ce1bc828cfef460a3822f30565b5a71fb106987ffdf822f37709

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-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.19-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5b831f39ed281931c515f99671fb7ae416ddb6952ff00b66706e8503e9ee9c42
MD5 a46b24fbf486997740583c720cec5b46
BLAKE2b-256 77efb8602caad6b71649fc7cfbe509d93b0fbe14d80719521c60a0ded58a13b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-cp313-cp313-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.19-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 500f536ce6aa606677146f6c06c5993edaf793bc2a0870b338c7061d6841d78c
MD5 db218590b8ed8ff4172279e0a01726ba
BLAKE2b-256 93016e1e89bb2dd71ff9d140c352774d98c0b92173b9bdde6c0f9435b8d0da48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 081d79cf19daacd1f95e03a76ced025acad2a982543fc78f97d578e49ab5cca0
MD5 9413a46465350a5167748a675ca7f30a
BLAKE2b-256 06e6e815d833edb419aa25ce4239d95a56b0e2e0521821e71f3c57caa50472d5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.19-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 613.5 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.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e25f5b1e0f831587b7193a8d063633ec8cc87e8309d68e434ddc7faef0530c64
MD5 7dc9950b11d5181393aa9a66a220df51
BLAKE2b-256 644c59c782df24fb377685188efd612a99ae489c013310f71ab7622adcb6dc08

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-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.19-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f9ba18da2e6fe11aab817c31a79c74a6bd8539664b704b48e5f92421d2aba6e2
MD5 df7ddb524ece317fc9078463d01aeeb3
BLAKE2b-256 1f9c8f19f10ba76bb59f9941c130069d2e0d80b9a2130d9837e5a38202881695

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-cp312-cp312-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.19-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7d8e05b3509adb5b8ef2615dd74ea6f3a43a5304e0bece5c8652ab131ce28fbe
MD5 4fda8b6ef2f58e85de27165b06930a63
BLAKE2b-256 1a560301dc87efc6be448bae1e419b324328901375143e7418c3218e6193f394

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c61e4d76a894ef05dfefea6209803a1c0aa0c00cb4cfe3ab208bf0460756696
MD5 0dad785b3a47723fde3ace7543396f48
BLAKE2b-256 a34a058f8984abe1a04d7b9e06706fed77dd78f3fbcc7911f41854c4b0ca8322

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.19-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 619.5 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.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0b3387ff1884a455e01ca31109b1885a82356ef8374f0dad77728f7881a947e9
MD5 70903de19619b24421be6d359e689ba9
BLAKE2b-256 b4c2eb96b10737b7d53f59f8c1ec87c1ceb4149d2ddedac2f085a73a2b72d02a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-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.19-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e0de24a84b2299e9b4f4abf474e6815f2a4b96c86cfc87b05eda00e815537341
MD5 0a3b1ccbd39012223171e894e14964ff
BLAKE2b-256 7d1979f8b15fe2fe91582c37bd3972f9238819de825d3ee300b35abfe8aa5870

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-cp311-cp311-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.19-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3f739ccead77c2f68be03a00f10052d952296f512472a9df7ad3ac86dd5d14c3
MD5 64a2617db205d26d90d5f13f0235a8a6
BLAKE2b-256 d0c1d5a676b4d6cfd2d18dd712f6e63b87822f1dc9503cb8a996739251b6138c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d2af6f214084879a2d7e2b42ebca8cc6d7422577c4e7e19547e7bfdf05f49d40
MD5 870bf22f0ee6fe254caae06c53dfdc6e
BLAKE2b-256 4493fe83ae031d213d8f804552ef28f077b73f8689eb9814a337e1442c123050

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.19-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 620.5 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.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f59e721ee9ad734a25705fdf1b66c3ee3f58888aee30480e142a23561b1c8f59
MD5 090ededa0bea536ce86e692c3bd277b2
BLAKE2b-256 bc17e558dbdb9b8a69b53fe7433dec2056754d2d516131b5cdf081396523d4f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-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.19-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cec368fe7782b531b11a6128446fb5b4601798fc2fd6ae8c9171b865d46759e4
MD5 33aba194c7287763664189a7ec62ca38
BLAKE2b-256 5f5bd619dc131e4262dc75cc24a6bae291c78e5f9c835ca451c86ab1d991e054

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylmrob-0.5.19-cp310-cp310-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.19-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5128f57b41f73f63ecdfe2d17289d0a76a7c4b7be6c231fad224db5eab76d50a
MD5 1c1c7738b557b7bc16a870c88bbc74a6
BLAKE2b-256 e9ba2652c416fe9140055b2a4a83e945bf4c9f3f6f57d1a73ac491a799e91cc1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.19-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fe56dac448f13152d9834204cb21d7ce87ee1915e1ca96374287e3787c9f9ac
MD5 b229b1036a1212abb10a7cff2a25c381
BLAKE2b-256 48f640a13bd20f98186b0503f935250e0b97acecff2103fbc80b8e411160f05e

See more details on using hashes here.

Provenance

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