robustbase


Namerobustbase JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/deepak7376/robustbase
SummaryA Python Based Library to Calculate Estimators (Sn, Qn, MAD, IQR, covComed)
upload_time2024-06-21 18:16:50
maintainerNone
docs_urlNone
authorDeepak Yadav
requires_python>=3.0
licenseMIT
keywords robust statistics robustness sn qn mad iqr
VCS
bugtrack_url
requirements numpy scipy statistics
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Downloads](https://pepy.tech/badge/robustbase)](https://pepy.tech/project/robustbase)
[![Downloads](https://pepy.tech/badge/robustbase/month)](https://pepy.tech/project/robustbase/month)
[![Downloads](https://pepy.tech/badge/robustbase/week)](https://pepy.tech/project/robustbase/week)

# robustbase
> A Python Library to Calculate Robust Statistical Estimators.

## Installation

OS X, Windows & Linux:

```sh
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](https://rdrr.io/rforge/robustbase/man/Qn.html)

```python
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](https://rdrr.io/rforge/robustbase/man/Sn.html)

```python
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](https://en.wikipedia.org/wiki/Median_absolute_deviation)

```python
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](https://en.wikipedia.org/wiki/Interquartile_range)

```python
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

```python
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:

```sh
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](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
- [Qn Scale Estimator](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/qn_scale.htm)
- [Sn Scale Estimator](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/sn_scale.htm)
- [Median Absolute Deviation](https://www.statisticshowto.datasciencecentral.com/median-absolute-deviation/)
- [Interquartile Range](https://www.statisticshowto.datasciencecentral.com/probability-and-statistics/interquartile-range/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deepak7376/robustbase",
    "name": "robustbase",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": null,
    "keywords": "robust statistics robustness Sn Qn MAD IQR",
    "author": "Deepak Yadav",
    "author_email": "dky.united@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/14/05/802a0c9219d9eca66fa070980e3f5090c43c77cdd0b0429393997adc1f38/robustbase-3.1.0.tar.gz",
    "platform": null,
    "description": "[![Downloads](https://pepy.tech/badge/robustbase)](https://pepy.tech/project/robustbase)\n[![Downloads](https://pepy.tech/badge/robustbase/month)](https://pepy.tech/project/robustbase/month)\n[![Downloads](https://pepy.tech/badge/robustbase/week)](https://pepy.tech/project/robustbase/week)\n\n# robustbase\n> A Python Library to Calculate Robust Statistical Estimators.\n\n## Installation\n\nOS X, Windows & Linux:\n\n```sh\npip install robustbase\n```\n## Usage Example\n\nThis package provides functions to calculate the following robust statistical estimators:\n\n* **Qn Scale Estimator**\n    * Computes the robust scale estimator Qn, an efficient alternative to the MAD. [Read More](https://rdrr.io/rforge/robustbase/man/Qn.html)\n\n```python\nfrom robustbase.stats import Qn\n\nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\n# With bias correction\nres = Qn(x)  # result: 3.196183\n\n# Without bias correction\nres = Qn(x, finite_corr=False)  # result: 4.43828\n\n```\n\n* **Sn Scale Estimator**\n    * Computes the robust scale estimator Sn, an efficient alternative to the MAD. [Read More](https://rdrr.io/rforge/robustbase/man/Sn.html)\n\n```python\nfrom robustbase.stats import Sn\n\nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\n# With bias correction\nres = Sn(x)  # result: 3.5778\n\n# Without bias correction\nres = Sn(x, finite_corr=False)  # result: 3.5778\n\n```\n\n* **Median Absolute Deviation (MAD)**\n    * Compute the MAD, a robust measure of the variability of a univariate sample of quantitative data. [Read More](https://en.wikipedia.org/wiki/Median_absolute_deviation)\n\n```python\nfrom robustbase.stats import mad\n\nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nres = mad(x)\n\n```\n* **Interquartile Range (IQR)**\n    * Compute the interquartile range, a measure of statistical dispersion, or spread. [Read More](https://en.wikipedia.org/wiki/Interquartile_range)\n\n```python\nfrom robustbase.stats import iqr\n\nx = [1, 2, 3, 4, 5]\nres = iqr(x)\n```\n\n* **Co-Median Location and Scatter \"Covariance\" Estimator**\n    * Compute the multivariate \"Comedian\" covariance, a robust measure of multivariate location and scatter. Read More\n\n```python\nfrom robustbase.stats import covComed\n\n# Example data matrix\nX = np.random.rand(100, 3)\n\n# Compute the Co-Median covariance estimator\nresult = covComed(X)\n\n# Access the components of the result\nprint(\"Covariance Matrix:\", result.cov)\nprint(\"Center:\", result.center)\nprint(\"Weights:\", result.weights)\n```\n\n## Development Setup\n\nFor local development setup:\n\n```sh\ngit clone https://github.com/deepak7376/robustbase\ncd robustbase\npip install -r requirements.txt -r requirements-dev.txt\n```\n\n## Recent Changes\n\n### Version 3.0.0\n- Changed the API's call\n- Refactored the dir structure\n- Updated README with usage examples for all functions.\n\n\n## Contributing\n\n1. Fork it ([https://github.com/deepak7376/robustbase/fork](https://github.com/deepak7376/robustbase/fork))\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n## References\n- [Qn Scale Estimator](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/qn_scale.htm)\n- [Sn Scale Estimator](https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/sn_scale.htm)\n- [Median Absolute Deviation](https://www.statisticshowto.datasciencecentral.com/median-absolute-deviation/)\n- [Interquartile Range](https://www.statisticshowto.datasciencecentral.com/probability-and-statistics/interquartile-range/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python Based Library to Calculate Estimators (Sn, Qn, MAD, IQR, covComed)",
    "version": "3.1.0",
    "project_urls": {
        "Homepage": "https://github.com/deepak7376/robustbase",
        "Source": "https://github.com/deepak7376/robustbase",
        "Tracker": "https://github.com/deepak7376/robustbase/issues"
    },
    "split_keywords": [
        "robust",
        "statistics",
        "robustness",
        "sn",
        "qn",
        "mad",
        "iqr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8833d14279bf582d62d5c21b2f176b231a34ea181192ab168cedee3be20c8072",
                "md5": "327cd8ea8e3e07c355564328595f2e68",
                "sha256": "f9b9a9933e91d75f2e4b395da9269ada1e630cff08249dbdf114224ee230088c"
            },
            "downloads": -1,
            "filename": "robustbase-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "327cd8ea8e3e07c355564328595f2e68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 9364,
            "upload_time": "2024-06-21T18:16:48",
            "upload_time_iso_8601": "2024-06-21T18:16:48.654169Z",
            "url": "https://files.pythonhosted.org/packages/88/33/d14279bf582d62d5c21b2f176b231a34ea181192ab168cedee3be20c8072/robustbase-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1405802a0c9219d9eca66fa070980e3f5090c43c77cdd0b0429393997adc1f38",
                "md5": "28d8f406d1ee1708b70523ed7aa89454",
                "sha256": "3c123d58df50a3af15cf5fb37da6b370978442ddc04caf1600871f5ea078ed20"
            },
            "downloads": -1,
            "filename": "robustbase-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "28d8f406d1ee1708b70523ed7aa89454",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 10525,
            "upload_time": "2024-06-21T18:16:50",
            "upload_time_iso_8601": "2024-06-21T18:16:50.033087Z",
            "url": "https://files.pythonhosted.org/packages/14/05/802a0c9219d9eca66fa070980e3f5090c43c77cdd0b0429393997adc1f38/robustbase-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-21 18:16:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deepak7376",
    "github_project": "robustbase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.18.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "statistics",
            "specs": [
                [
                    ">=",
                    "1.0.3.5"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "robustbase"
}
        
Elapsed time: 1.21849s