code wiki / sketch

topic: sketch

192 modules sharing the sketch name family (derived from the tree's prefix discipline).

Probabilistic data structures — count-min, HyperLogLog-class cardinality, tuple sketches and friends — implemented and benchmarked as the tree's approximate-counting substrate. The largest single topic by code volume: streaming measurement is a first-class citizen here, which is consistent with the house rule that every claim be a measured number.

narrated overview -- maintained by the narration lane, module links verified against this wiki.

moduledescriptionlinesfuncs
nx_sketch_ams.nxAMS sketch (Alon-Matias-Szegedy 1996).21711
nx_sketch_bit_vector.nxdense bit vector with popcount + bitwise ops.24918
nx_sketch_bloom.nxBloom filter v2 (sovereign-tier with typed envelope).16810
nx_sketch_buglog.nx5W+H+GLP provenance ledger primitive.33834
nx_sketch_cms.nxCount-Min Sketch in NishiLang.2199
nx_sketch_comparator.nxsealed-verdict comparator for head-to-head stomp claims.2207
nx_sketch_correlation.nxstreaming Pearson correlation + linear regression.21112
nx_sketch_count_sketch.nxCountSketch (Charikar-Chen-Farach-Colton 2002).22413
nx_sketch_counting_bloom.nxCounting Bloom filter (Fan-Cao-Almeida-Broder 1998).25313
nx_sketch_cpc.nxCPC sparse-mode cardinality sketch (Lang 2017 / FM85).19612
nx_sketch_cpc_dense.nxCPC dense bitmap mode + HIP estimator.22814
nx_sketch_cuckoo.nxCuckoo Filter (Fan et al. 2014).28318
nx_sketch_cusum.nxCUSUM change-point detector (Page 1954).13911
nx_sketch_ddsketch.nxDDSketch (Masson et al, PVLDB 2019).20810
nx_sketch_entropy.nxstreaming Shannon entropy estimator.1348
nx_sketch_epsilon_greedy.nxEpsilon-Greedy bandit (Sutton-Barto, classic).23014
nx_sketch_ewma.nxexponentially-weighted moving average (EWMA).1378
nx_sketch_geomean.nxstreaming geometric mean via log-space accumulation.14711
nx_sketch_hash_map.nxopen-addressing hash map (i64 -> i64).26217
nx_sketch_histogram.nxfixed-bin histogram with quantile + merge.21714
nx_sketch_hll.nxHyperLogLog cardinality sketch in NishiLang.50013
nx_sketch_hll4.nxHLL_4 with Heule exception table.27612
nx_sketch_hll_packed.nx4-bit and 6-bit packed-register HLL.2127
nx_sketch_hll_provenance.nxsample CAPABILITY + IMPROVEMENT_OPP entries871
nx_sketch_hll_provenance_v2.nxpost-bias-table provenance entries.701
nx_sketch_hllmap.nxMap<key, HLL> for "distinct count per key" queries.25113
nx_sketch_holt.nxHolt's linear method (double exponential smoothing).1398
nx_sketch_kll.nxcompactor-hierarchy quantile sketch.31713
nx_sketch_kmeans1d.nxstreaming 1D k-means clustering.19112
nx_sketch_kmv.nxKMV (K-Minimum-Values) sketch.31610
nx_sketch_linear_counter.nxLinear Counting (Whang-Vander Zanden 1990).22913
nx_sketch_lossy_counting.nxManku-Motwani 2002 Lossy Counting.23714
nx_sketch_mann_kendall.nxstreaming Mann-Kendall trend test.17810
nx_sketch_markov.nxdiscrete-state Markov chain transition tracker.20412
nx_sketch_min_heap.nxbinary min-heap (priority queue) primitive.20213
nx_sketch_misra_gries.nxMisra-Gries frequent items (1982).23113
nx_sketch_moments.nxstreaming higher moments (skewness + kurtosis).22215
nx_sketch_naive_bayes.nxstreaming binary Naive Bayes classifier.19812
nx_sketch_reservoir.nxVitter reservoir sampling + quantile.18810
nx_sketch_robust_hll.nxadversarial-safe HLL via median-of-k.2077
nx_sketch_segment_tree.nxsegment tree for range sum / min / max queries.21012
nx_sketch_sliding_window.nxlast-W-samples rolling aggregator.18712
nx_sketch_space_saving.nxSpaceSaving top-K heavy hitters.22612
nx_sketch_stream_stats.nxstreaming mean / variance / stddev / min / max.21314
nx_sketch_tdigest.nxT-Digest (Dunning 2019) tail-tight quantile sketch.34011
nx_sketch_theta.nxTheta sketch (Beyer/Haas 2014).37711
nx_sketch_tuple.nxTuple sketch (Theta + per-hash auxiliary data).32812
nx_sketch_types.nxL-4 typed envelope scaffold for streaming sketches.911
nx_sketch_types_kat.nxKAT for nx_sketch_types (ApproxI64 typed-envelope scaffold; 53 children).453
nx_sketch_ucb1.nxUCB1 multi-armed bandit (Auer-Cesa-Bianchi-Fischer 2002).23512
nx_sketch_union_find.nxDisjoint Set Union (Union-Find) primitive.1588
nx_sketch_varopt.nxWeighted reservoir sampling (Efraimidis-Spirakis 2006 / Cohen 2011).24512
nx_sketch_zscore.nxpoint z-score anomaly detector.13410
sketch_ams.nxAMS sketch (Alon-Matias-Szegedy 1996). 23111
sketch_ams_test.nxAMS F_2 estimator verification. 1102
sketch_ams_vs_naive_bench.nxAMS F_2 vs naive exact tracker.1262
sketch_bit_vector.nxdense bit vector with popcount + bitwise ops. 24318
sketch_bit_vector_test.nxdense bit vector verification. 1171
sketch_bloom.nxBloom filter v2 (sovereign-tier with typed envelope). 16210
sketch_bloom_test.nxBloom v2 verification. 1091
sketch_buglog.nx5W+H+GLP provenance ledger primitive. 33134
sketch_buglog_test.nxID-based G + L referencing docs/{genealogy,lineage}.md. 761
sketch_cb_vs_cuckoo_delete_bench.nxboth-support-delete paired bench.1352
sketch_cms.nxCount-Min Sketch in NishiLang. 2139
sketch_cms_test.nxCount-Min Sketch behavioral test. 1372
sketch_comparator.nxsealed-verdict comparator for head-to-head stomp claims. 2117
sketch_comparator_test.nxsealed-verdict comparator validation. 1201
sketch_correlation.nxstreaming Pearson correlation + linear regression. 20512
sketch_correlation_test.nxstreaming Pearson + regression verification. 1582
sketch_count_sketch.nxCountSketch (Charikar-Chen-Farach-Colton 2002). 23013
sketch_count_sketch_negative_bench.nxnegative-insert capability bench.1653
sketch_count_sketch_test.nxCountSketch (unbiased frequency) verification. 1132
sketch_count_sketch_vs_cms_bias_bench.nxbias-direction paired bench.1873
sketch_counting_bloom.nxCounting Bloom filter (Fan-Cao-Almeida-Broder 1998). 24713
sketch_counting_bloom_test.nxCounting Bloom with delete + multi-set. 1441
sketch_cpc.nxCPC sparse-mode cardinality sketch (Lang 2017 / FM85). 18812
sketch_cpc_dense.nxCPC dense bitmap mode + HIP estimator. 21914
sketch_cpc_dense_test.nxCPC dense-mode verification. 1372
sketch_cpc_test.nxCPC (sparse + HIP estimator) verification. 1402
sketch_cuckoo.nxCuckoo Filter (Fan et al. 2014). 27718
sketch_cuckoo_delete_vs_bloom_bench.nxDELETE capability bench.1512
sketch_cuckoo_test.nxCuckoo Filter end-to-end verification. 1361
sketch_cusum.nxCUSUM change-point detector (Page 1954). 13311
sketch_cusum_test.nxCUSUM change-point detector verification. 1211
sketch_cusum_vs_threshold_bench.nxchange-point detection bench.991
sketch_ddsketch.nxDDSketch (Masson et al, PVLDB 2019). 26410
sketch_ddsketch_test.nxDDSketch multiplicative-error quantile verification. 1472
sketch_ddsketch_vs_tdigest_tail_bench.nxmultiplicative-error tail.1282
sketch_entropy.nxstreaming Shannon entropy estimator. 1288
sketch_entropy_test.nxstreaming Shannon entropy verification. 1232
sketch_epsilon_greedy.nxEpsilon-Greedy bandit (Sutton-Barto, classic). 22414
sketch_epsilon_greedy_test.nxepsilon-greedy bandit verification. 1523
sketch_ewma.nxexponentially-weighted moving average (EWMA). 1318
sketch_ewma_test.nxEWMA streaming smoother verification. 972
sketch_freq_directions.nxLiberty 2013 Frequent Directions sketch.47725
sketch_freq_directions_test.nxFD verification.1252
sketch_freq_directions_vs_topnorm_bench.nxpaired bench, FD vs naive top-norm.2234
sketch_geomean.nxstreaming geometric mean via log-space accumulation. 14111
sketch_geomean_test.nxgeometric mean via log-space accumulation tests. 932
sketch_hash_map.nxopen-addressing hash map (i64 -> i64). 25617
sketch_hash_map_test.nxhash map foundational primitive verification. 1351
sketch_histogram.nxfixed-bin histogram with quantile + merge. 21114
sketch_histogram_test.nxfixed-bin histogram + quantile + merge. 1452
sketch_hll.nxHyperLogLog cardinality sketch in NishiLang. 56315
sketch_hll4.nxHLL_4 with Heule exception table. 27012
sketch_hll4_test.nxHLL_4 + Heule exception table verification. 1112
sketch_hll4_vs_hll8_bench.nxmemory-efficiency paired bench.1033
sketch_hll_lgk12_vs_lgk8_bench.nxvalidates bits-up cap raise.1123
sketch_hll_packed.nx4-bit and 6-bit packed-register HLL. 2067
sketch_hll_packed_test.nxend-to-end test for HLL_6 packed 922
sketch_hll_packed_vs_hll8_bench.nx6-bit register memory bench.893
sketch_hll_provenance.nxsample CAPABILITY + IMPROVEMENT_OPP entries 811
sketch_hll_provenance_v2.nxpost-bias-table provenance entries. 641
sketch_hll_test.nxend-to-end test for the NishiLang HLL port. 963
sketch_hll_vs_materialized_set_bench.nxSTRUCTURAL class comparison.1173
sketch_hllmap.nxMap<key, HLL> for "distinct count per key" queries. 24513
sketch_hllmap_merge_capability_bench.nxcapability-EXCEED bench.2003
sketch_hllmap_test.nxHllMap (distinct-per-key) with merge. 1702
sketch_holt.nxHolt's linear method (double exponential smoothing). 1338
sketch_holt_test.nxHolt's linear forecast verification. 862
sketch_holt_vs_ewma_trended_bench.nxtrend tracking paired bench.792
sketch_kll.nxcompactor-hierarchy quantile sketch. 32513
sketch_kll_test.nxKLL/MRL compactor-cascade verification. 1102
sketch_kll_vs_reservoir_bench.nxMATCHED-MEMORY honest measurement.1402
sketch_kmeans1d.nxstreaming 1D k-means clustering. 18512
sketch_kmeans1d_test.nx1D streaming k-means verification. 1042
sketch_kmv.nxKMV (K-Minimum-Values) sketch. 31010
sketch_kmv_jaccard_vs_naive_bench.nxKMV Jaccard vs naive O(N).1563
sketch_kmv_test.nxKMV cardinality + union + Jaccard verification. 1962
sketch_lc_vs_hll_small_n_bench.nxLC sweet-spot paired bench.903
sketch_linear_counter.nxLinear Counting (Whang-Vander Zanden 1990). 22313
sketch_linear_counter_test.nxWhang-Vander Zanden 1990 cardinality. 1582
sketch_lossy_counting.nxManku-Motwani 2002 Lossy Counting. 23114
sketch_lossy_counting_test.nxManku-Motwani Lossy Counting verification. 991
sketch_mann_kendall.nxstreaming Mann-Kendall trend test. 17210
sketch_mann_kendall_test.nxstreaming Mann-Kendall trend test verification. 1001
sketch_mann_kendall_vs_endpoint_bench.nxtrend detection bench.901
sketch_markov.nxdiscrete-state Markov chain transition tracker. 19812
sketch_markov_test.nxMarkov chain transition tracker verification. 1262
sketch_markov_vs_uniform_bench.nxtransition prediction bench.912
sketch_mg_ss_bracket_bench.nxbracketing capability paired bench.1661
sketch_min_heap.nxbinary min-heap (priority queue) primitive. 19613
sketch_min_heap_test.nxbinary min-heap verification. 1231
sketch_misra_gries.nxMisra-Gries frequent items (1982). 22513
sketch_misra_gries_test.nxMG heavy hitters (under-estimate variant). 1162
sketch_moments.nxstreaming higher moments (skewness + kurtosis). 21615
sketch_moments_test.nxstreaming skewness + kurtosis verification. 1242
sketch_naive_bayes.nxstreaming binary Naive Bayes classifier. 19212
sketch_naive_bayes_test.nxbinary Naive Bayes classifier verification. 851
sketch_naive_bayes_vs_majority_bench.nxclassification accuracy bench.1271
sketch_observability_dashboard_bench.nxCOMPOSITION integration bench.1923
sketch_reqsketch.nxrelative-error streaming quantile sketch.38014
sketch_reqsketch_test.nxReqSketch verification.1342
sketch_reqsketch_vs_kll_bench.nxMATCHED-MEMORY paired measurement.1342
sketch_reservoir.nxVitter reservoir sampling + quantile. 18210
sketch_reservoir_test.nxVitter reservoir + sample-based 1312
sketch_robust_hll.nxadversarial-safe HLL via median-of-k. 2037
sketch_robust_hll_test.nxadversarial-safety smoke for the 953
sketch_robust_hll_vs_hll_adv_bench.nxadversarial paired bench.1333
sketch_segment_tree.nxsegment tree for range sum / min / max queries. 20412
sketch_segment_tree_test.nxrange sum / min / max verification. 1331
sketch_sliding_window.nxlast-W-samples rolling aggregator. 18112
sketch_sliding_window_test.nxlast-W-samples rolling aggregator tests. 861
sketch_space_saving.nxSpaceSaving top-K heavy hitters. 22012
sketch_space_saving_test.nxSpaceSaving behavioral test. 1201
sketch_stream_stats.nxstreaming mean / variance / stddev / min / max. 20714
sketch_stream_stats_test.nxstreaming mean / variance / stddev / merge. 1272
sketch_tdigest.nxT-Digest (Dunning 2019) tail-tight quantile sketch. 34011
sketch_tdigest_test.nxT-Digest quantile + tail-tight verification. 962
sketch_tdigest_v2.nxT-Digest with Dunning k1 arcsin-based scale.35914
sketch_tdigest_v2_test.nxV2 (Dunning k1 arcsin scale) verification.1232
sketch_tdigest_v2_vs_v1_bench.nxpaired measurement, T-Digest v2 vs v1.1131
sketch_tdigest_vs_materialized_quantile_bench.nxstreaming quantile EXCEED.862
sketch_theta.nxTheta sketch (Beyer/Haas 2014). 37111
sketch_theta_intersect_vs_hll_bench.nxcapability bench, Theta vs HLL.1433
sketch_theta_test.nxTheta sketch union + intersection + difference. 1432
sketch_thompson.nxThompson Sampling (Bernoulli-Beta bandit).29216
sketch_thompson_test.nxThompson Sampling verification.1402
sketch_thompson_vs_ucb1_bench.nxpaired measurement, Thompson vs UCB1.1181
sketch_tuple.nxTuple sketch (Theta + per-hash auxiliary data). 32212
sketch_tuple_test.nxTuple sketch (Theta + scalar) with reducer + merge. 1662
sketch_types.nxL-4 typed envelope scaffold for streaming sketches. 861
sketch_types_gate.nxthe gate for the typed loss-envelope 139 modules import.931
sketch_ucb1.nxUCB1 multi-armed bandit (Auer-Cesa-Bianchi-Fischer 2002). 22912
sketch_ucb1_test.nxmulti-armed bandit verification. 1233
sketch_union_find.nxDisjoint Set Union (Union-Find) primitive. 1528
sketch_union_find_test.nxDisjoint Set Union verification. 1341
sketch_varopt.nxWeighted reservoir sampling (Efraimidis-Spirakis 2006 / Cohen 2011). 23912
sketch_varopt_test.nxWeighted reservoir sampling verification. 1111
sketch_varopt_vs_reservoir_biased_bench.nxweighted sampling capability.1111
sketch_zscore.nxpoint z-score anomaly detector. 12810
sketch_zscore_test.nxz-score anomaly detector verification. 1042