Pinboard (jm)
https://pinboard.in/u:jm/public/
recent bookmarks from jm[1902.04023] Computing Extremely Accurate Quantiles Using t-Digests2019-02-18T11:05:52+00:00
https://arxiv.org/abs/1902.04023
jmjava go python open-source quantiles percentiles approximation statistics sketching algorithms via:fanfhttps://pinboard.in/https://pinboard.in/u:jm/b:6c84ec8a0947/Caffeine cache adopts Window TinyLfu eviction policy2015-11-09T12:29:05+00:00
https://github.com/ben-manes/caffeine/wiki/Efficiency
jmW-TinyLfu uses a small admission LRU that evicts to a large Segmented LRU if accepted by the TinyLfu admission policy. TinyLfu relies on a frequency sketch to probabilistically estimate the historic usage of an entry. The window allows the policy to have a high hit rate when entries exhibit a high temporal / low frequency access pattern which would otherwise be rejected. The configuration enables the cache to estimate the frequency and recency of an entry with low overhead. This implementation uses a 4-bit CountMinSketch, growing at 8 bytes per cache entry to be accurate. Unlike ARC and LIRS, this policy does not retain non-resident keys.
]]>tinylfu caches caching cache-eviction java8 guava caffeine lru count-min sketching algorithmshttps://pinboard.in/https://pinboard.in/u:jm/b:aa024d2d0c0c/Philippe Flajolet’s contribution to streaming algorithms [preso]2013-11-12T22:15:25+00:00
https://speakerdeck.com/timonk/philippe-flajolets-contribution-to-streaming-algorithms
jmalgorithms sketching hyperloglog flajolet wegman adaptive-sampling sampling presentations slideshttps://pinboard.in/https://pinboard.in/u:jm/b:4e811a1c90f0/Recordinality2013-08-20T20:41:05+00:00
https://github.com/cscotta/recordinality
jmRecordinality is unique in that it provides cardinality estimation like HLL, but also offers "distinct value sampling." This means that Recordinality can allow us to fetch a random sample of distinct elements in a stream, invariant to cardinality. Put more succinctly, given a stream of elements containing 1,000,000 occurrences of 'A' and one occurrence each of 'B' - 'Z', the probability of any letter appearing in our sample is equal. Moreover, we can also efficiently store the number of times elements in our distinct sample have been observed. This can help us to understand the distribution of occurrences of elements in our stream. With it, we can answer questions like "do the elements we've sampled present in a power law-like pattern, or is the distribution of occurrences relatively even across the set?"
]]>sketching coding algorithms recordinality cardinality estimation hll hashing murmurhash javahttps://pinboard.in/https://pinboard.in/u:jm/b:56d75229aca1/Sketch of the Day: K-Minimum Values2013-06-25T21:48:52+00:00
http://blog.aggregateknowledge.com/2012/07/09/sketch-of-the-day-k-minimum-values/
jmalgorithms coding space-saving cardinality streams stream-processing estimation sets sketchinghttps://pinboard.in/https://pinboard.in/u:jm/b:c15a7a7f9322/js-hll2013-06-25T21:37:50+00:00
http://blog.aggregateknowledge.com/2013/06/18/open-source-release-js-hll/
jmOne of the first things that we wanted to do with HyperLogLog when we first started playing with it was to support and expose it natively in the browser. The thought of allowing users to directly interact with these structures -- perform arbitrary unions and intersections on effectively unbounded sets all on the client -- was exhilarating to us. [...] we are pleased to announce the open-source release of AK’s HyperLogLog implementation for JavaScript, js-hll. We are releasing this code under the Apache License, Version 2.0.
We knew that we couldn’t just release a bunch of JavaScript code without allowing you to see it in action — that would be a crime. We passed a few ideas around and the one that kept bubbling to the top was a way to kill two birds with one stone. We wanted something that would showcase what you can do with HLL in the browser and give us a tool for explaining HLLs. It is typical for us to explain how HLL intersections work using a Venn diagram. You draw some overlapping circles with a border that represents the error and you talk about how if that border is close to or larger than the intersection then you can’t say much about the size of that intersection. This works just ok on a whiteboard but what you really want is to just build a visualization that allows you to select from some sets and see the overlap. Maybe even play with the precision a little bit to see how that changes the result. Well, we did just that!
]]>javascript ui hll hyperloglog algorithms sketching js sets intersection union apache open-sourcehttps://pinboard.in/https://pinboard.in/u:jm/b:aedd388dbaa3/hlld2013-06-21T10:46:27+00:00
https://github.com/armon/hlld#readme
jma high-performance C server which is used to expose HyperLogLog sets and operations over them to networked clients. It uses a simple ASCII protocol which is human readable, and similar to memcached.
HyperLogLog's are a relatively new sketching data structure. They are used to estimate cardinality, i.e. the unique number of items in a set. They are based on the observation that any bit in a "good" hash function is indepedenent of any other bit and that the probability of getting a string of N bits all set to the same value is 1/(2^N). There is a lot more in the math, but that is the basic intuition. What is even more incredible is that the storage required to do the counting is log(log(N)). So with a 6 bit register, we can count well into the trillions. For more information, its best to read the papers referenced at the end. TL;DR: HyperLogLogs enable you to have a set with about 1.6% variance, using 3280 bytes, and estimate sizes in the trillions.
(via:cscotta)]]>hyper-log-log hlld hll data-structures memcached daemons sketching estimation big-data cardinality algorithms via:cscottahttps://pinboard.in/https://pinboard.in/u:jm/b:e287f3096462/