Skip to main content

Python port of robustbase::lmrob (MM regression)

Project description

pylmrob

CI PyPI 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.18.tar.gz (11.3 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.18-cp313-cp313-win_amd64.whl (605.9 kB view details)

Uploaded CPython 3.13Windows x86-64

pylmrob-0.5.18-cp313-cp313-manylinux_2_28_x86_64.whl (673.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pylmrob-0.5.18-cp313-cp313-manylinux_2_28_aarch64.whl (635.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pylmrob-0.5.18-cp313-cp313-macosx_11_0_arm64.whl (422.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pylmrob-0.5.18-cp312-cp312-win_amd64.whl (606.2 kB view details)

Uploaded CPython 3.12Windows x86-64

pylmrob-0.5.18-cp312-cp312-manylinux_2_28_x86_64.whl (671.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pylmrob-0.5.18-cp312-cp312-manylinux_2_28_aarch64.whl (635.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pylmrob-0.5.18-cp312-cp312-macosx_11_0_arm64.whl (424.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pylmrob-0.5.18-cp311-cp311-win_amd64.whl (612.3 kB view details)

Uploaded CPython 3.11Windows x86-64

pylmrob-0.5.18-cp311-cp311-manylinux_2_28_x86_64.whl (678.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pylmrob-0.5.18-cp311-cp311-manylinux_2_28_aarch64.whl (647.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pylmrob-0.5.18-cp311-cp311-macosx_11_0_arm64.whl (423.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pylmrob-0.5.18-cp310-cp310-win_amd64.whl (612.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pylmrob-0.5.18-cp310-cp310-manylinux_2_28_x86_64.whl (679.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pylmrob-0.5.18-cp310-cp310-manylinux_2_28_aarch64.whl (648.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

pylmrob-0.5.18-cp310-cp310-macosx_11_0_arm64.whl (425.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pylmrob-0.5.18.tar.gz
  • Upload date:
  • Size: 11.3 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.18.tar.gz
Algorithm Hash digest
SHA256 096251969c0110fb39652a9d912ab8e30b5ea591ee3030264bdeaec6510e8751
MD5 569a169de32aeb503d7a3f2c96fd4d44
BLAKE2b-256 dc5c0fc122f69dbe60a764f462633d2ec0f78fb7199117f306b4e3e16db26f30

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.18-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 605.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.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0669a73f0ba8d767aaa00007c28349888730269151fc8721bd0ba0828fd95e8b
MD5 c68c029f0d01969bd1094f0c320788f1
BLAKE2b-256 2acaf6f2d97d5726dd82c3d72cc37bab0bd501226a5778324e5331831a5ae673

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6653c1beab217ca8c969255d870bdea8df2b3cd4d13384bfc9f101a738bfe683
MD5 c666c1cdb5e01782611b733bf320e21e
BLAKE2b-256 41d1cbbedb66a0d2fccc8033deb106ed6fcccd03d175f16e2d5a1410faf314fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 137a2974712fa69b8925bbb8fa7fb5fcaa4f51a80753ff3b48dd9dddf4baac9f
MD5 f607280adc8c79fee6e59923d1a73ed5
BLAKE2b-256 cc0d3dee516ce4cc3dd6c411ce06f1f43ba761203ac04c6c0215af07125c12f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38be987da3758f6532eda295279885628053f6cc42c6214e3ddc95bd51651670
MD5 397754bed1f41da27da017b6914a8fb3
BLAKE2b-256 08066298ba126daba4e942fbfd949224eb49af1aaaa28a782296464b4640d1de

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.18-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 606.2 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.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3751ed74f585ae726eb03fb3d776e5aa5095918fa3dfe0fcf99e904b20963229
MD5 61660d38b27ac2ee3bcc3437ca3b47ba
BLAKE2b-256 165c2a025f6b30eab924195ede8caff626e1d51b4ad6963f15237ac695578bbe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22f51bdd1a75ef0bcbb602c8c7953c949714c189dfb1deeb3fe933cc3070c632
MD5 14565767710a54886738b7d9c0486b68
BLAKE2b-256 3cab32e540b1c580b4e75c340a0734730d7fcb0521bff1f0883c296e4d1acceb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0fb077d94cdd0b12709d3a7a4792a1f31c0d6de93fe1bdf842dca540e08e58a9
MD5 48551726b77be79bd83d7bdb2896e274
BLAKE2b-256 01dfad51f04b1077090e7ac658f2bde72028a4a229a4139bc1316fc829e82b53

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a8e1762f7528789fb359ed927a0361cdd1b8f4a0dda33b0ec702953c14db769
MD5 0898ebbbde5c807511239edc55767ecd
BLAKE2b-256 02752baba932640fb52e79916bcee9e6c30b86a524758fe0065da6a8f48cf1e8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.18-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 612.3 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.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c2e94757b20e8807d7f6599daae6a2b053016c6b2c4a78de029975538345b21d
MD5 58d9380edc5b210e1858dd711718a6ea
BLAKE2b-256 eeae1609efb2cadfe58f386f4cb6e2c91685d032925769165a795105d66c9fd5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 184e40e793c21ae8a2714d5ba690971cf2cef1ac08e9495940b6145f84631e43
MD5 67e187a153c0fb483565e21b2b13cd33
BLAKE2b-256 a976cc0b2961a183e001cdff500582ecc451ecff255fd4ae6662c91f808b62a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f4f99145200340e06b36560f90a942230228c97584c15882c76b120f64e310f3
MD5 3616ca766fba73ae0444b8a40178f206
BLAKE2b-256 70e46b5bf80940182b51072449261d67465af809dfb8dd8fef03a85717748f25

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9369ae4dfb143fdc03f90d7f1bff410d83ed586dc34762edcbf77f0dc5030078
MD5 0e4f88c8f1c36d2436608e6f60ac1d5d
BLAKE2b-256 499cffceecdc650c11a8560969580f4d929850c262cdda5440e7c11477b253d4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pylmrob-0.5.18-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 612.8 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.18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 17000f5c41d8f02f18212b9e1d688e81fdcbcb5b9f3d7861aedbbb033e934a0a
MD5 e4d72cea18aa60b75388f8f610885669
BLAKE2b-256 f9f81b4bd764c975f850e5fe2228db353017ace63f183f0f736098e9abbdc46a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96ae31ba2278687b8c2b1c5d17aad8392e8526d7154e7d7edc0a2d30e27ac783
MD5 cbc8f796c6bd1d9005f686962933e7b4
BLAKE2b-256 2c8cf26757ee611c54e17fdcb2d42c810bebcd2703c751764b2a787d1e8d34cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a74659bbdb24998ab4bbf98af699b1981ddecd196800f33a52a1b3b5919e7290
MD5 a8416a97fc93af8200624f56efb32719
BLAKE2b-256 a2260f6c6ca16931c3be428f326f88e1778b92d4b41149de3eab30799a0dd4bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pylmrob-0.5.18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 feba10028b2a4326c83602c6f744a6b9a781df3fa21da4f3f1c1f66b8c31badd
MD5 ce0578906df62157112cd7945eb942e8
BLAKE2b-256 8136e0b1808d48779142d2608b0767c864d36b1f2470aa8a1d71bf1d1bcc2975

See more details on using hashes here.

Provenance

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