robustbase


Namerobustbase JSON
Version 0.2.9 PyPI version JSON
download
home_pagehttps://github.com/deepak7376/robustbase
SummaryA Python Based Library to Calculate Estimators (Sn, Qn, MAD, IQR)
upload_time2023-03-20 18:08:39
maintainer
docs_urlNone
authorDeepak Yadav
requires_python>=3
licenseMIT
keywords sn qn mad iqr
VCS
bugtrack_url
requirements No requirements were recorded.
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 Estimators.

## Installation

OS X , Windows & Linux:

```sh
pip install robustbase
```
## Usage example

This package is used to calculate the following statistical estimators.

* **Qn scale estimator**
    * Compute the robust scale estimator Qn, an efficient alternative to the MAD. [Read More.](https://rdrr.io/rforge/robustbase/man/Qn.html)
```python
Qn(x, constant = 2.21914, finite_corr=True)
```

```python
from robustbase import Qn
  
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# with bias correction
res = Qn(x)  # ans = 3.196183

# Without bias correction
res = Qn(x, finite_corr=False)  # ans = 4.43828

```

* **Sn scale estimator**
    * Compute the robust scale estimator Sn, an efficient alternative to the MAD.[Read More.](https://rdrr.io/rforge/robustbase/man/Sn.html)

```python
Sn(x, constant = 1.1926, finite_corr=True)

```

```python
from robustbase import Sn
  
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# with bias correction
res = Sn(x)  # ans = 3.5778 

# Without bias correction
res = Sn(x, finite_corr=False)  # ans = 3.5778

```

* **Median Absolute Deviation(MAD)**

```python
mad(x, center = None, constant = 1.4826, na = False,
    low = False, high = False)
```

```python
from robustbase import mad

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
res = mad(x)

```
* **Interquartile Range (IQR)**

```python
iqr(x)
```

```python
from robustbase import iqr

x = [1, 2, 3, 4. 5]
res = iqr(x)
```

## Development setup

For local development setup

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

## Meta

Deepak Yadav – [@imdeepak_dky](https://twitter.com/imdeepak_dky) – dky.united@gmail.com

Distributed under the MIT license. See ``LICENSE`` for more information.

[https://github.com/deepak7376/robustbase/blob/master/LICENSE](https://github.com/deepak7376)

## 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
https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/qn_scale.htm
https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/sn_scale.htm
https://www.statisticshowto.datasciencecentral.com/median-absolute-deviation/
https://www.statisticshowto.datasciencecentral.com/probability-and-statistics/interquartile-range/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deepak7376/robustbase",
    "name": "robustbase",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "Sn Qn MAD IQR",
    "author": "Deepak Yadav",
    "author_email": "dky.united@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/74/1b/ae6a81a86af490913f9c5e68c67974871da21b3d7d89c0ecd04f5d40f3e5/robustbase-0.2.9.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# robustbase\n> A Python Library to Calculate Estimators.\n\n## Installation\n\nOS X , Windows & Linux:\n\n```sh\npip install robustbase\n```\n## Usage example\n\nThis package is used to calculate the following statistical estimators.\n\n* **Qn scale estimator**\n    * Compute the robust scale estimator Qn, an efficient alternative to the MAD. [Read More.](https://rdrr.io/rforge/robustbase/man/Qn.html)\n```python\nQn(x, constant = 2.21914, finite_corr=True)\n```\n\n```python\nfrom robustbase import Qn\n  \nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\n# with bias correction\nres = Qn(x)  # ans = 3.196183\n\n# Without bias correction\nres = Qn(x, finite_corr=False)  # ans = 4.43828\n\n```\n\n* **Sn scale estimator**\n    * Compute the robust scale estimator Sn, an efficient alternative to the MAD.[Read More.](https://rdrr.io/rforge/robustbase/man/Sn.html)\n\n```python\nSn(x, constant = 1.1926, finite_corr=True)\n\n```\n\n```python\nfrom robustbase import Sn\n  \nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\n# with bias correction\nres = Sn(x)  # ans = 3.5778 \n\n# Without bias correction\nres = Sn(x, finite_corr=False)  # ans = 3.5778\n\n```\n\n* **Median Absolute Deviation(MAD)**\n\n```python\nmad(x, center = None, constant = 1.4826, na = False,\n    low = False, high = False)\n```\n\n```python\nfrom robustbase import mad\n\nx = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\nres = mad(x)\n\n```\n* **Interquartile Range (IQR)**\n\n```python\niqr(x)\n```\n\n```python\nfrom robustbase import iqr\n\nx = [1, 2, 3, 4. 5]\nres = iqr(x)\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\n```\n\n## Meta\n\nDeepak Yadav \u2013 [@imdeepak_dky](https://twitter.com/imdeepak_dky) \u2013 dky.united@gmail.com\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/deepak7376/robustbase/blob/master/LICENSE](https://github.com/deepak7376)\n\n## Contributing\n\n1. Fork it (<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\nhttps://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/qn_scale.htm\nhttps://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/sn_scale.htm\nhttps://www.statisticshowto.datasciencecentral.com/median-absolute-deviation/\nhttps://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)",
    "version": "0.2.9",
    "split_keywords": [
        "sn",
        "qn",
        "mad",
        "iqr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45a4928705f6483848b527cc249ac2ad1c5374f8835236180f33c94d9240e585",
                "md5": "77740575c17173b0c579d314d1ce1a21",
                "sha256": "0d0b2a41e1f833a937f6dbc9c9f541940674c778f1738d391434b744b3d5a757"
            },
            "downloads": -1,
            "filename": "robustbase-0.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77740575c17173b0c579d314d1ce1a21",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 4721,
            "upload_time": "2023-03-20T18:08:37",
            "upload_time_iso_8601": "2023-03-20T18:08:37.199541Z",
            "url": "https://files.pythonhosted.org/packages/45/a4/928705f6483848b527cc249ac2ad1c5374f8835236180f33c94d9240e585/robustbase-0.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "741bae6a81a86af490913f9c5e68c67974871da21b3d7d89c0ecd04f5d40f3e5",
                "md5": "2f234cf5d0894f01823dac0be84bbeb0",
                "sha256": "6b068425c94fe022352df2007fe9c945e14e8b81abedc87a309becb60fc676df"
            },
            "downloads": -1,
            "filename": "robustbase-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "2f234cf5d0894f01823dac0be84bbeb0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 4900,
            "upload_time": "2023-03-20T18:08:39",
            "upload_time_iso_8601": "2023-03-20T18:08:39.035359Z",
            "url": "https://files.pythonhosted.org/packages/74/1b/ae6a81a86af490913f9c5e68c67974871da21b3d7d89c0ecd04f5d40f3e5/robustbase-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-20 18:08:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "deepak7376",
    "github_project": "robustbase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "robustbase"
}
        
Elapsed time: 0.04771s