Onyx logo

Previous topic

onyx.util.iterutils – The objects in this module provide operations on iterable objects.

Next topic

onyx.util.numbers_in_files – Extract numbers from text files

This Page

onyx.util.nonparametric – The idea here is that you have an unbounded stream of discrete-space

samples. You are interested in statistics and/or models of the time series at many time scales. This module supports the idea of keeping a number of statistics (sufficient for models) taking up space proportional to the logarithm of the number of samples seen, and covering exponentially larger intervals of the past.

class onyx.util.nonparametric.NonParametricAccumulator

Bases: object

Logarithm-space accumulator for non-parametric discrete models.

>>> a = NonParametricAccumulator()
>>> a.accum_many(xrange(5))
>>> a.accum_many(xrange(10))
>>> a.epochs
[[(8, 64), (9, 81)], [(13, 85)], [(14, 54)], [(11, 31)]]
accum_many(iterable)
accum_one(datum)
combine_stats(stats_iterable)
extend()
linear_stats(datum)
zero_stats()