Javascript

Calculating Percentiles on Streaming Data Part 8: Parameterizing Algorithms on Measurement Type

Calculating Percentiles on Streaming Data Part 8: Parameterizing Algorithms on Measurement Type
This is part 8 of my series on calculating percentiles on streaming data. As mentioned in part 6 of this series, I have published a C++ and JavaScript library which implements a number of streaming percentile algorithms on GitHub at https://github.com/sengelha/streaming-percentiles. Versions 1.x and 2.x of the C++ library required all measurements to use the type double, and usage of the algorithms looked something like this: #include <stmpct/gk.hpp> double epsilon = 0.

Creating UMD Module from Emscripten using CMake

Creating UMD Module from Emscripten using CMake
By default, Emscripten creates a module which can be used from both Node.JS and the browser, but it has the following issues: The module pollutes the global namespace The module is created with the name Module (in my case, I require streamingPercentiles) The module cannot be loaded by some module loaders such as require.js While the above issues can (mostly) be corrected by using –s MODULARIZE=1, it changes the semantics of the resulting JavaScript file, as the module now returns a function rather than an object.

Calculating Percentiles on Streaming Data Part 7: Cormode-Korn-Muthukrishnan-Srivastava

Calculating Percentiles on Streaming Data Part 7: Cormode-Korn-Muthukrishnan-Srivastava
This is part 7 of my series on calculating percentiles on streaming data. In 2005, Graham Cormode, Flip Korn, S. Muthukrishnan, and Divesh Srivastava published a paper called Effective Computation of Biased Quantiles over Data Streams [CKMS05]. This paper took the Greenwald-Khanna algorithm [GK01] and made the following notable changes: Generalized the algorithm to work with arbitrary targeted quantiles, where a targeted quantile is a combination of a quantile $\phi$ and a maximum allowable error $\epsilon$.