Skip to main content

Statistics for Streaming Data

Project description

Documentation Status CI Status Code Coverage Code Style: Black

statstream is a lightweight Python package providing data analysis and statistics utilities for streaming data.

Its main goal is to provide single-pass variants of conventional numpy data analysis and statistics functionality for streaming data that is either generated on the fly or to large to be handled at once. Data can be streamed as in chunks called mini-batches, which makes statstream extremely useful in combination with machine learning and deep learning packages like keras, tensorflow, or pytorch.

statstream functions consume iterators providing batches of data. They compute statistics of these batches and combine them to obtain statistics for the full data set.

import statstream
mean = statstream.streaming_mean(some_iterable)

The Overview and Examples sections of our documentation provide more realistic and complete examples.

Project Information

statstream is released under the MIT license, its documentation lives at Read the Docs, the code on GitHub, and the latest release can soon be found on PyPI. It’s tested on Python 2.7 and 3.4+.

If you’d like to contribute to statstream you’re most welcome. We have written a short guide to help you get you started!

Further Reading

Additional information on the algorithmic aspects of statstream can be found in the following works:

  • Tony F. Chan & Gene H. Golub & Randall J. LeVeque, “Updating formulae and a pairwise algorithm for computing sample variances”, 1979
  • Radim, Rehurek, “Scalability of Semantic Analysis in Natural Language Processing”, 2011

Acknowledgments

During the setup of this project we were heavily influenced and inspired by the works of Hynek Schlawack and in particular his attrs package and blog posts on testing and packaing and deploying to PyPI. Thank you for sharing your experiences and insights.

Project details


Release history Release notifications

Download files

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

Files for statstream, version 19.1.0
Filename, size File type Python version Upload date Hashes
Filename, size statstream-19.1.0-py2.py3-none-any.whl (12.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size statstream-19.1.0.tar.gz (36.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page