OnlineBinnedStats#

class protopipe.benchmarks.OnlineBinnedStats(bin_edges)[source]#

Bases: object

Class to dynamically compute one-dimensional binned statistics.

Parameters
bin_edges: array-like

Values which define the edges of the bins to use.

Notes

This is an implementation of the Welford’s online algorithm (see [1] and references therein).

References

1

https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford’s_online_algorithm

Attributes Summary

bin_centers

Compute the center for each bin.

bin_width

Compute the width of all bins.

mean

Compute the mean for bins with at least 1 count.

std

Compute the standard deviation for bins with at least 1 count.

Methods Summary

update(x, values)

Update the mean and (estimated) variance of the sequence.

Attributes Documentation

bin_centers#

Compute the center for each bin.

bin_width#

Compute the width of all bins.

mean#

Compute the mean for bins with at least 1 count.

std#

Compute the standard deviation for bins with at least 1 count.

Methods Documentation

update(x, values)[source]#

Update the mean and (estimated) variance of the sequence.