A Python port of the R robustbase package with optimized performance using JAX
Project description
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robustbase_py_optimized-0.1.0.tar.gz.
File metadata
- Download URL: robustbase_py_optimized-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c31e5adcedec90d79bb87d88b252960372219da1907552d5aa068f644225a83b
|
|
| MD5 |
f93365a05af22d8043b73d91a2796db6
|
|
| BLAKE2b-256 |
7191bb42e29e611e92caee9e7cf8f090d4a2ca0747cb779a16339207473cc397
|
File details
Details for the file robustbase_py_optimized-0.1.0-py3-none-any.whl.
File metadata
- Download URL: robustbase_py_optimized-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad5150622a4fffe98f1f39b3433cb78fb5dd54156a765f72e88dd887cfcd58ad
|
|
| MD5 |
97ef940453cee32c30fbaf823e6336df
|
|
| BLAKE2b-256 |
e7b244eacf5b3b9d4e9e534e4d6732e1e9ed9467fd1ff925ea89fa30cbbd4815
|