Skip to main content

robustbase-py

A Python port of the R robustbase package.

Description

This package implements robust statistical methods, primarily focusing on robust regression (LMROB) as implemented in the R robustbase package. It provides MM-estimators initialized by S-estimators for high breakdown point and efficiency.

Installation

pip install robustbase-py-optimized

Usage

import numpy as np
from robustbase import LMROB

# Generate synthetic data with outliers
n = 100
p = 3
rng = np.random.default_rng(42)
X = rng.standard_normal((n, p))
beta_true = np.array([1.0, 2.0, 0.5])
y = X @ beta_true + rng.standard_normal(n)

# Contaminate data (outliers)
y[:10] = 100.0

# Fit Robust Linear Regression
model = LMROB(method='MM', psi='bisquare')
model.fit(X, y)

print("Estimated Coefficients:", model.coef_)
print("True Coefficients:", beta_true)
print("Robust Scale:", model.scale_)

Features

  • LMROB: MM-estimator regression (S-init).
  • Psi Functions: Bisquare, Huber.
  • Fast-S Algorithm: For robust scale estimation and initialization.

License

GPL-3.0

Metadata

Release files for robustbase-py-optimized 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robustbase-py-optimized 0.1.1
File Size Uploaded
robustbase_py_optimized-0.1.1.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robustbase-py-optimized 0.1.1
File Interpreter ABI Platform
robustbase_py_optimized-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / robustbase_py_optimized-0.1.1.tar.gz

Download URL robustbase_py_optimized-0.1.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f52d783e438e159f00e14bf96f4c1ff8fbdde84c6940055ceffef8fa04012cd3
BLAKE2b-256 checksum
How to use checksums
a5f23540cb476e505b8a6b663efb73da9ed44db106763d371ac9a5ff0f685b11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / robustbase_py_optimized-0.1.1-py3-none-any.whl

Download URL robustbase_py_optimized-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3373fda1ff5d96253b1170844e092e7d87af2ddf8a50081b6eae946459dbce4d
BLAKE2b-256 checksum
How to use checksums
a94ced64d9879d328131eb882647d0e96e506c70d6c1e67913b0596371007d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page