Theme

The thread: The answer is an estimate — page 2

Page 2 of 2, continuing the same thread in the same order.
0.313103000.250.50.7511.251.52Zipf exponent s of the stream — 0 is flatvariance of one copy ÷ moment²sampling, F4sampling, F3sampling, F2signs, F22,048 keys, 60,000 items, exactdashed: tug-of-war One pass, and no room

The moments past the second

Past the second moment no sign trick works, and the estimator that does — pick one position of the stream, count how often its key comes again, report m(r^k − (r − 1)^k) — is unbiased for every moment on every stream. Its variance can be computed exactly rather than sampled, and on real streams it is nowhere near its guarantee: 103 copies give F3 to ten per cent on a flat stream of 2,048 keys, and 2,630 on a moderately skewed one. The guarantee asks for 48,381, and it is not loose. One heavy key among 2,047 keys seen once needs 11,799.

1.201.401.601.80executed queries the fit sawexpected regret248163264128256fitted spread75% bound95% bound99% boundtrusting the estimatethe best divisor, 1.5ρ = 4, σ = 1.5, 120 fits a pointlower is better When it does not fit

A planner that knows how sure it is

A planner that fits its insurance divisor from a handful of executed queries under-insures, because a spread fitted to a small sample is biased low. The textbook repair is to use the upper end of a confidence interval on the spread instead of its centre. At a read ratio of four it makes the planner worse than trusting its estimate for longer — until sixty-four queries rather than sixteen — and it buys the worst case immediately, from 22.4 times the better plan to 6.2 after two queries. The bound is not a correction towards the truth. It is a dial between two different planners.

0.50011.5020102030cells the destination moved from the one the landmarks were fitted tocells expanded, fitted placement ÷ cornersthe corners0/87/4811/4825/4832/4834/4841/4842/48digits: cases worsethan the corners8 maps, 6 directions a distancebelow one the fit is still worth having Two parameters

A placement after the traffic moved

Four landmarks fitted to twenty queries that all end at one cell expand two thirds of the corners' cells there. Move the destination ten cells and the advantage is gone; move it thirty and the fitted placement expands nearly twice the corners' cells. Choosing again costs 317,000 cells of search — the saving of 8,600 queries — so on streams whose destination drifts, a policy that refits on a counter never beats fitting once and keeping the result, and past a drift of about ten cells nothing fitted beats the corners.

All threads