Skip to main content

Robust linear regression in the multiple regression and multivariate regression cases using the minimum covariance determinant (MCD).

Project description

mcd-regression

Python implementation of robust linear regression in the multiple regression and multivariate regression cases using the minimum covariance determinant (MCD).

Usage (docs/examples/example.ipynb):

>>> from mcd_regression import MCDRegression
>>> mcdr = MCDRegression()
>>> x = data[:, 0, None] # n x d_x, must be 2D
>>> y = data[:, 1:] # n x d_y, must be 2D
>>> mcdr.fit(x, y)
>>> residuals = y - mcdr.predict(x)
>>> slope = mcdr.beta
>>> intercept = mcdr.alpha

Installation:

  • Available via PyPI as mcd-regression
$ python -m pip install mcd-regression
  • Development
$ git clone https://github.com/stevenstetzler/mcd_regression.git
$ python -m pip install -e mcd_regression

References:

  • Peter J Rousseeuw, Stefan Van Aelst, Katrien Van Driessen & Jose A Gulló (2004) Robust Multivariate Regression, Technometrics, 46:3, 293-305, DOI: 10.1198/004017004000000329

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

mcd_regression-0.1.1.tar.gz (75.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcd_regression-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mcd_regression-0.1.1.tar.gz.

File metadata

  • Download URL: mcd_regression-0.1.1.tar.gz
  • Upload date:
  • Size: 75.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcd_regression-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0fc968c123fa22420c5147ffcd0437b87216ff4ccbe9848857dd37b62343444a
MD5 4d5d8a9e2ee1bdcf2aab28755b981edd
BLAKE2b-256 9ad0514260b92180374202f4c85b1855d4e859443b991b218c4a358a4b2660e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcd_regression-0.1.1.tar.gz:

Publisher: publish-to-pypi.yml on stevenstetzler/mcd-regression

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcd_regression-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mcd_regression-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcd_regression-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b19eaad8503ad200f046d0a39b521658ffca28f9efe998ee7f4fae80c2a69c10
MD5 ab1a3e81f5639a1d617564d57d12e8fc
BLAKE2b-256 98684c5432959dda3990238e995d8da4c039c900f497de11d3693d7ea5831f87

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcd_regression-0.1.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on stevenstetzler/mcd-regression

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