Skip to main content

Downloads Downloads Downloads

robustbase

A Python Library to Calculate Robust Statistical Estimators.

Installation

OS X, Windows & Linux:

pip install robustbase

Usage Example

This package provides functions to calculate the following robust statistical estimators:

  • Qn Scale Estimator
    • Computes the robust scale estimator Qn, an efficient alternative to the MAD. Read More
from robustbase.stats import Qn

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# With bias correction
res = Qn(x)  # result: 3.196183

# Without bias correction
res = Qn(x, finite_corr=False)  # result: 4.43828
  • Sn Scale Estimator
    • Computes the robust scale estimator Sn, an efficient alternative to the MAD. Read More
from robustbase.stats import Sn

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# With bias correction
res = Sn(x)  # result: 3.5778

# Without bias correction
res = Sn(x, finite_corr=False)  # result: 3.5778
  • Median Absolute Deviation (MAD)
    • Compute the MAD, a robust measure of the variability of a univariate sample of quantitative data. Read More
from robustbase.stats import mad

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
res = mad(x)
  • Interquartile Range (IQR)
    • Compute the interquartile range, a measure of statistical dispersion, or spread. Read More
from robustbase.stats import iqr

x = [1, 2, 3, 4, 5]
res = iqr(x)
  • Co-Median Location and Scatter "Covariance" Estimator
    • Compute the multivariate "Comedian" covariance, a robust measure of multivariate location and scatter. Read More
from robustbase.stats import covComed

# Example data matrix
X = np.random.rand(100, 3)

# Compute the Co-Median covariance estimator
result = covComed(X)

# Access the components of the result
print("Covariance Matrix:", result.cov)
print("Center:", result.center)
print("Weights:", result.weights)

Development Setup

For local development setup:

git clone https://github.com/deepak7376/robustbase
cd robustbase
pip install -r requirements.txt -r requirements-dev.txt

Recent Changes

Version 3.0.0

  • Changed the API's call
  • Refactored the dir structure
  • Updated README with usage examples for all functions.

Contributing

  1. Fork it (https://github.com/deepak7376/robustbase/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

References

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robustbase-3.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

robustbase-3.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file robustbase-3.1.0.tar.gz.

File metadata

  • Download URL: robustbase-3.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for robustbase-3.1.0.tar.gz
Algorithm Hash digest
SHA256 3c123d58df50a3af15cf5fb37da6b370978442ddc04caf1600871f5ea078ed20
MD5 28d8f406d1ee1708b70523ed7aa89454
BLAKE2b-256 1405802a0c9219d9eca66fa070980e3f5090c43c77cdd0b0429393997adc1f38

See more details on using hashes here.

File details

Details for the file robustbase-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: robustbase-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for robustbase-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b9a9933e91d75f2e4b395da9269ada1e630cff08249dbdf114224ee230088c
MD5 327cd8ea8e3e07c355564328595f2e68
BLAKE2b-256 8833d14279bf582d62d5c21b2f176b231a34ea181192ab168cedee3be20c8072

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 files

3.0.8

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page