Skip to content

biona001/sweepystats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (ordinary and weighted least squares)
  • 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
  • Partial correlation
  • GLMs
  • Generalized (pseudo-) inverses
  • Cholesky decomposition
  • Benchmarks, e.g. timing comparison with np.inv() and np.linalg.lstsq()
  • Recursive tiling, see joshday/SweepOperator.jl#9
  • Blog post

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages