Skip to main content

Python package to perform the statistical sweep operation on symmetric numpy matrices

Project description

Sweepystats

Because Sweepy was taken

Documentation build Actions Status codecov Downloads Downloads versions PyPI - Version GitHub Release

Sweepystats is a python package for performing the statistical sweep operation 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

pip install sweepystats

Documentation

Visit 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

Know another package that supports sweeping? PRs are welcomed!

References

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

Project details


Download files

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

Source Distribution

sweepystats-0.0.10.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

sweepystats-0.0.10-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file sweepystats-0.0.10.tar.gz.

File metadata

  • Download URL: sweepystats-0.0.10.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.6

File hashes

Hashes for sweepystats-0.0.10.tar.gz
Algorithm Hash digest
SHA256 dacbf62a2ecbb167fae8505d9fe4412be5b668b008870d66b48dceac70f4ff9f
MD5 caa6b9ac237ca3124a2a02a38353248f
BLAKE2b-256 b1debc97fb5b3331993a984ecc38f3d6d3b787171d83bfd2736a4ea0febe3aee

See more details on using hashes here.

File details

Details for the file sweepystats-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: sweepystats-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.6

File hashes

Hashes for sweepystats-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0366a5335ab5da0b244afbd5f2594e50f50e38d2bfdb996f879a548664882086
MD5 7ff01d919064c4ef071da2edd85e876a
BLAKE2b-256 88768dfd6a4f9fa65af5681f1fabd95c0632e685c83d426cfe182a9ad94cb8b8

See more details on using hashes here.

Supported by

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