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-1.0.0-cp38-cp38-win_amd64.whl (19.2 kB view details)

Uploaded CPython 3.8Windows x86-64

rolling_quantiles-1.0.0-cp38-cp38-manylinux1_x86_64.whl (46.4 kB view details)

Uploaded CPython 3.8

rolling_quantiles-1.0.0-cp38-cp38-macosx_10_15_x86_64.whl (17.3 kB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

File details

Details for the file rolling_quantiles-1.0.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: rolling_quantiles-1.0.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for rolling_quantiles-1.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cf99ceaaa5408b99541ee1b6ed16c24e6c0135ac7a6c580d553a37aa7ce25cd8
MD5 3d40eba12bfcbd1d72a2ebb26ade19cd
BLAKE2b-256 d9792b635b30dee10e1ed8826905d96cd9f79b55e34013bcedb1d3b1f1850aee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rolling_quantiles-1.0.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for rolling_quantiles-1.0.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 48a4f9c1d2f0f92bbcea449abfecfb0ac2fd55ca152fc97a7b235008f426d6a9
MD5 3413031d58939dae977b39cf65de6dee
BLAKE2b-256 c315ef4f056926fad03cfdb46dbe153a5a986853aa8a70a11436b326d92e42d5

See more details on using hashes here.

File details

Details for the file rolling_quantiles-1.0.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: rolling_quantiles-1.0.0-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for rolling_quantiles-1.0.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 978ff1a9c962f6475904b948adef6aa8dd6faf24745aeb363f26ff7dd73414b0
MD5 5a2285c1bbed869b2fea9dc084c904b6
BLAKE2b-256 a326db31e723fd769457df5364d4b0f92722b332d1c050eb6f438e5fc42dd087

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