sweepystats


Namesweepystats JSON
Version 0.0.10 PyPI version JSON
download
home_pageNone
SummaryPython package to perform the statistical sweep operation on symmetric numpy matrices
upload_time2025-01-04 00:41:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Benjamin Chu <benchu99@hotmail.com> and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords sweep matrix inverse determinant regression anova
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sweepystats

*Because Sweepy was taken*

[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://biona001.github.io/sweepystats)
[![build Actions Status](https://github.com/biona001/sweepystats/actions/workflows/CI.yml/badge.svg)](https://github.com/biona001/sweepystats/actions)
[![codecov](https://codecov.io/gh/biona001/sweepystats/graph/badge.svg?token=UJJX0JCVKK)](https://codecov.io/gh/biona001/sweepystats)
[![Downloads](https://static.pepy.tech/badge/sweepystats)](https://pepy.tech/project/sweepystats)
[![Downloads](https://static.pepy.tech/badge/sweepystats/month)](https://pepy.tech/project/sweepystats)
![versions](https://img.shields.io/pypi/pyversions/sweepystats.svg)
![PyPI - Version](https://img.shields.io/pypi/v/sweepystats)
![GitHub Release](https://img.shields.io/github/v/release/biona001/sweepystats)

`Sweepystats` is a python package for performing the statistical [sweep operation](https://hua-zhou.github.io/teaching/biostatm280-2017spring/slides/11-sweep/sweep.html) on `numpy` matrices. 

> The sweep operator is perhaps the most versatile tool of all statistical operators that not only afford solutions to the normal equation and a gamut of additional statistics, but also allow complete insight into the nature of least squares. Once mastered, the general concepts of the sweep operator allow the whole least squares process to be visualized. 
> -- James H. Goodnight (1979)

> Although there are faster and numerically more stable algorithms for inverting a matrix or solving a least-squares problem, no algorithm matches the conceptual simplicity and utility of sweeping.
> -- Kenneth Lange (2010)

## Installation

```shell
pip install sweepystats
```

## Documentation

Visit [https://biona001.github.io/sweepystats](https://biona001.github.io/sweepystats)

## Features

The following operations are supported **in-place** and **allocation-free**:

+ Matrix inversions
+ Computation of determinants
+ Checking of (strict) positive-definiteness
+ Computation of matrix rank
+ Linear regression
+ Stepwise regression
+ ANOVA
+ ... etc. See the documentation for full list of features

## Running tests

1. Git clone the repo
2. Install `pytest` via `pip3 install pytest` if you haven't already
3. Execute `pytest tests` in the top level directory of `sweepystats`

## Related packages

+ [SweepOperator.jl](https://github.com/joshday/SweepOperator.jl) in Julia
+ [sweep.operator](https://search.r-project.org/CRAN/refmans/fastmatrix/html/sweep.operator.html) in R

Know another package that supports sweeping? PRs are welcomed!

## References

+ [Biostats M280 lecture notes at UCLA](https://hua-zhou.github.io/teaching/biostatm280-2017spring/slides/11-sweep/sweep.html)
+ Section 7.4-7.6 of [Numerical Analysis for Statisticians](https://link.springer.com/book/10.1007/978-1-4419-5945-4) by Kenneth Lange (2010). Probably the best place to read about sweep operator.
+ [Blog post by SAS](https://blogs.sas.com/content/iml/2018/04/18/sweep-operator-sas.html)
+ [James Goodnight's awesome paper from 1978](https://www.jstor.org/stable/2683825)

## TODO
+ 2-stage and 3-stage least squares
+ Weighted least squares
+ Partial correlation
+ GLMs
+ Generalized (pseudo-) inverses
+ Cholesky decomposition
+ Benchmarks, e.g. timing comparison with `np.inv()` and `np.linalg.lstsq()`
+ Recursive tiling, see https://github.com/joshday/SweepOperator.jl/issues/9
+ Blog post

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sweepystats",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "sweep, matrix inverse, determinant, regression, ANOVA",
    "author": null,
    "author_email": "Benjamin Chu <benchu99@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b1/de/bc97fb5b3331993a984ecc38f3d6d3b787171d83bfd2736a4ea0febe3aee/sweepystats-0.0.10.tar.gz",
    "platform": null,
    "description": "# Sweepystats\n\n*Because Sweepy was taken*\n\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://biona001.github.io/sweepystats)\n[![build Actions Status](https://github.com/biona001/sweepystats/actions/workflows/CI.yml/badge.svg)](https://github.com/biona001/sweepystats/actions)\n[![codecov](https://codecov.io/gh/biona001/sweepystats/graph/badge.svg?token=UJJX0JCVKK)](https://codecov.io/gh/biona001/sweepystats)\n[![Downloads](https://static.pepy.tech/badge/sweepystats)](https://pepy.tech/project/sweepystats)\n[![Downloads](https://static.pepy.tech/badge/sweepystats/month)](https://pepy.tech/project/sweepystats)\n![versions](https://img.shields.io/pypi/pyversions/sweepystats.svg)\n![PyPI - Version](https://img.shields.io/pypi/v/sweepystats)\n![GitHub Release](https://img.shields.io/github/v/release/biona001/sweepystats)\n\n`Sweepystats` is a python package for performing the statistical [sweep operation](https://hua-zhou.github.io/teaching/biostatm280-2017spring/slides/11-sweep/sweep.html) on `numpy` matrices. \n\n> The sweep operator is perhaps the most versatile tool of all statistical operators that not only afford solutions to the normal equation and a gamut of additional statistics, but also allow complete insight into the nature of least squares. Once mastered, the general concepts of the sweep operator allow the whole least squares process to be visualized. \n> -- James H. Goodnight (1979)\n\n> Although there are faster and numerically more stable algorithms for inverting a matrix or solving a least-squares problem, no algorithm matches the conceptual simplicity and utility of sweeping.\n> -- Kenneth Lange (2010)\n\n## Installation\n\n```shell\npip install sweepystats\n```\n\n## Documentation\n\nVisit [https://biona001.github.io/sweepystats](https://biona001.github.io/sweepystats)\n\n## Features\n\nThe following operations are supported **in-place** and **allocation-free**:\n\n+ Matrix inversions\n+ Computation of determinants\n+ Checking of (strict) positive-definiteness\n+ Computation of matrix rank\n+ Linear regression\n+ Stepwise regression\n+ ANOVA\n+ ... etc. See the documentation for full list of features\n\n## Running tests\n\n1. Git clone the repo\n2. Install `pytest` via `pip3 install pytest` if you haven't already\n3. Execute `pytest tests` in the top level directory of `sweepystats`\n\n## Related packages\n\n+ [SweepOperator.jl](https://github.com/joshday/SweepOperator.jl) in Julia\n+ [sweep.operator](https://search.r-project.org/CRAN/refmans/fastmatrix/html/sweep.operator.html) in R\n\nKnow another package that supports sweeping? PRs are welcomed!\n\n## References\n\n+ [Biostats M280 lecture notes at UCLA](https://hua-zhou.github.io/teaching/biostatm280-2017spring/slides/11-sweep/sweep.html)\n+ Section 7.4-7.6 of [Numerical Analysis for Statisticians](https://link.springer.com/book/10.1007/978-1-4419-5945-4) by Kenneth Lange (2010). Probably the best place to read about sweep operator.\n+ [Blog post by SAS](https://blogs.sas.com/content/iml/2018/04/18/sweep-operator-sas.html)\n+ [James Goodnight's awesome paper from 1978](https://www.jstor.org/stable/2683825)\n\n## TODO\n+ 2-stage and 3-stage least squares\n+ Weighted least squares\n+ Partial correlation\n+ GLMs\n+ Generalized (pseudo-) inverses\n+ Cholesky decomposition\n+ Benchmarks, e.g. timing comparison with `np.inv()` and `np.linalg.lstsq()`\n+ Recursive tiling, see https://github.com/joshday/SweepOperator.jl/issues/9\n+ Blog post\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Benjamin Chu <benchu99@hotmail.com> and contributors  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Python package to perform the statistical sweep operation on symmetric numpy matrices",
    "version": "0.0.10",
    "project_urls": {
        "Documentation": "https://biona001.github.io/sweepystats",
        "Homepage": "https://github.com/biona001/sweepystats",
        "Issues": "https://github.com/biona001/sweepystats/issues"
    },
    "split_keywords": [
        "sweep",
        " matrix inverse",
        " determinant",
        " regression",
        " anova"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88768dfd6a4f9fa65af5681f1fabd95c0632e685c83d426cfe182a9ad94cb8b8",
                "md5": "7ff01d919064c4ef071da2edd85e876a",
                "sha256": "0366a5335ab5da0b244afbd5f2594e50f50e38d2bfdb996f879a548664882086"
            },
            "downloads": -1,
            "filename": "sweepystats-0.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7ff01d919064c4ef071da2edd85e876a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11278,
            "upload_time": "2025-01-04T00:40:56",
            "upload_time_iso_8601": "2025-01-04T00:40:56.921188Z",
            "url": "https://files.pythonhosted.org/packages/88/76/8dfd6a4f9fa65af5681f1fabd95c0632e685c83d426cfe182a9ad94cb8b8/sweepystats-0.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1debc97fb5b3331993a984ecc38f3d6d3b787171d83bfd2736a4ea0febe3aee",
                "md5": "caa6b9ac237ca3124a2a02a38353248f",
                "sha256": "dacbf62a2ecbb167fae8505d9fe4412be5b668b008870d66b48dceac70f4ff9f"
            },
            "downloads": -1,
            "filename": "sweepystats-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "caa6b9ac237ca3124a2a02a38353248f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14279,
            "upload_time": "2025-01-04T00:41:02",
            "upload_time_iso_8601": "2025-01-04T00:41:02.657479Z",
            "url": "https://files.pythonhosted.org/packages/b1/de/bc97fb5b3331993a984ecc38f3d6d3b787171d83bfd2736a4ea0febe3aee/sweepystats-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-04 00:41:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "biona001",
    "github_project": "sweepystats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sweepystats"
}
        
Elapsed time: 0.87612s