public static class PartialGroupByKeyOperation.SamplingSizeEstimator<T> extends Object implements PartialGroupByKeyOperation.SizeEstimator<T>
| Modifier and Type | Field and Description |
|---|---|
static double |
CONFIDENCE_INTERVAL_SIGMA
The degree of confidence required in our expected value predictions
before we allow under-sampling.
|
static double |
CONFIDENCE_INTERVAL_SIZE
The desired size of our confidence interval (relative to the measured
expected value).
|
static long |
DEFAULT_MIN_SAMPLED
Default number of elements that must be measured before elements are skipped.
|
| Constructor and Description |
|---|
SamplingSizeEstimator(PartialGroupByKeyOperation.SizeEstimator<T> underlying,
double minSampleRate,
double maxSampleRate) |
SamplingSizeEstimator(PartialGroupByKeyOperation.SizeEstimator<T> underlying,
double minSampleRate,
double maxSampleRate,
long minSampled,
Random random) |
public static final double CONFIDENCE_INTERVAL_SIGMA
The value of 3.0 is a confidence interval of about 99.7% for a a high-degree-of-freedom t-distribution.
public static final double CONFIDENCE_INTERVAL_SIZE
The value of 0.25 is plus or minus 25%.
public static final long DEFAULT_MIN_SAMPLED
public SamplingSizeEstimator(PartialGroupByKeyOperation.SizeEstimator<T> underlying, double minSampleRate, double maxSampleRate)
public SamplingSizeEstimator(PartialGroupByKeyOperation.SizeEstimator<T> underlying, double minSampleRate, double maxSampleRate, long minSampled, Random random)
public long estimateSize(T element) throws Exception
estimateSize in interface PartialGroupByKeyOperation.SizeEstimator<T>Exception