Skip to main content

Composable and blazing fast rolling-quantile filters for streaming data and bulk batches.

Project description

Rolling Quantiles for NumPy

Hyper-efficient and composable filters.

  • Simple, clean, intuitive interface.
  • Supports streaming data or bulk processing.
  • Python 3 bindings for a compact library written in pure C.

A Quick Tour

import numpy as np
import rolling_quantiles as rq

pipe = rq.Pipeline( # rq.Pipeline is the only stateful object
  # declare a cascade of filters by a sequence of immutable description objects
  rq.LowPass(window=200, portion=100, subsample_rate=2),
    # the above takes a median (100 out of 200) of the most recent 200 points
    # and then spits out every other one
  rq.HighPass(window=10, portion=3,  subsample_rate=1))
    # that subsampled rolling median is then fed into this filter that takes a
    # 30% quantile on a window of size 10, and subtracts it from its raw input

# the pipeline exposes a set of read-only attributes that describe it
pipe.lag # = 60.0, the effective number of time units that the real-time output
         #   is delayed from the input
pipe.stride # = 2, how many inputs it takes to produce an output
            #  (>1 due to subsampling)


input = np.random.randn(1000)
output = pipe.feed(input) # the core, singular exposed method

# every other output will be a NaN to demarcate unready values
subsampled_output = output[1::pipe.stride]

See the Github repository for more details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

rolling_quantiles-0.1.1-cp38-cp38-manylinux1_x86_64.whl (45.8 kB view details)

Uploaded CPython 3.8

rolling_quantiles-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl (16.3 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file rolling_quantiles-0.1.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: rolling_quantiles-0.1.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 45.8 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/54.0.0 requests-toolbelt/0.8.0 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for rolling_quantiles-0.1.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5368c4bdec401564c084b98b99117ad59a9161ca1275517f8f85b91684e6d271
MD5 498a3e4dac8afe1db662200483a132c7
BLAKE2b-256 433b2dd52d6cc19a630cf3c99ab204f3ff16307c8df29669f2293fe77a2bf5ce

See more details on using hashes here.

File details

Details for the file rolling_quantiles-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: rolling_quantiles-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for rolling_quantiles-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 09bcf32ac05b372cc947f7e0dbb6c3792616426adad3c0cbaff6a5ba0e39df30
MD5 b638a74023d21beac8f3cf096e77aa2e
BLAKE2b-256 5f6ce1e5c551b754fd0c61c31fc887943889e28fa01f7b79dbca5d3a9f2406de

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