3 ms·
Frugal streaming. For estimating a median or percentile in a stream, using constant memory. It's very simple: if the current value is higher than our estimate
by allanrbo 4y ago
Frugal streaming.
For estimating a median or percentile in a stream, using constant memory.
It's very simple: if the current value is higher than our estimate, then increase our estimate by one. Else decrease by one. It will converge over long enough time.
This is called the Frugal-1U algorithm.
The Frugal-2U is a slightly more advanced version that modifies the step size along the way, plus other optimizations, to converge faster and not oscillate too much.
https://pastebin.com/wAcCS8WZ https://pastebin.com/wAcCS8WZ
- jjgreen 4y agoAn alternative streaming method due to Arandjelović, Pham, Venkatesh based on maximum entropy: https://ieeexplore.ieee.org/document/6971097 https://ieeexplore.ieee.org/document/6971097 and implementation in C: https://github.com/dressipi/apv-median https://github.com/dressipi/apv-median
- Lichtso 4y agoIsn't that essentially a low-pass filter?