From cc7dc0cfc93bae535fd4192c969c9bf9e5b89176 Mon Sep 17 00:00:00 2001 From: Milind Srivastava Date: Wed, 7 Oct 2026 12:29:38 -0400 Subject: [PATCH] study_saturation: record DDSketch mean relative value error (#175) The optimizer reads DD by mean_relative_value_error; the study wrote max_relative_value_error, so SaturationCurves::accuracy would panic on the metric mismatch. Judge DD on mean error, like KLL. Co-Authored-By: Claude Opus 5.5 --- scripts/study_saturation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/study_saturation.py b/scripts/study_saturation.py index 0e947223..0e3d0ec9 100644 --- a/scripts/study_saturation.py +++ b/scripts/study_saturation.py @@ -55,8 +55,8 @@ ("cardinality", "hll", ["lg_k=12", "lg_k=14", "lg_k=16"], "cardinality", "relative_error"), ("quantile", "kll-percall", ["k=50", "k=200", "k=800"], "rank-error", "mean_rank_err"), ("quantile", "dd", ["alpha=0.005", "alpha=0.01", "alpha=0.02", "alpha=0.05"], - # DDSketch's bound holds per quantile, so its curve is the worst one. - "relative-value-error", "max_relative_value_error"), + # Mean over probes, like KLL: both answer the same quantile query. + "relative-value-error", "mean_relative_value_error"), ] # The exact polars baseline (variant, config) each family is compared with.