Class BiasEstimator

java.lang.Object
com.yahoo.searchlib.aggregation.hll.BiasEstimator

public class BiasEstimator extends Object
Performs bias correction for a given precision and raw estimate. The values are taken from Google's HLL++ paper: https://docs.google.com/document/d/1gyjfMHy43U9OWBXxfaeG-3MjGzejW1dlpyMwEYAAWEI/view?fullscreen#
Author:
bjorncs
  • Constructor Details

    • BiasEstimator

      public BiasEstimator(int precision)
      Constructs the BiasEstimator for a given HLL precision.
      Parameters:
      precision - HLL precision
  • Method Details

    • estimateBias

      public double estimateBias(double rawEstimate)
      Maps a given raw estimate to a bias correction value. The callee should subtract the bias from the raw estimate to get a bias corrected HLL estimate. Uses linear interpolation when no exact value exist.
      Parameters:
      rawEstimate - The raw HLL estimate
      Returns:
      The estimated bias for the given raw estimate.