public abstract static class TDigestQuantiles.PerKeyDigest<K>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Double>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,com.tdunning.math.stats.MergingDigest>>>
TDigestQuantiles.perKey().| Constructor and Description |
|---|
PerKeyDigest() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,com.tdunning.math.stats.MergingDigest>> |
expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,java.lang.Double>> input) |
TDigestQuantiles.PerKeyDigest<K> |
withCompression(double cf)
Sets the compression factor
cf. |
public TDigestQuantiles.PerKeyDigest<K> withCompression(double cf)
cf.
Keep in mind that a compression factor cf of c guarantees a relative error less
than 3/c at mid quantiles.
The accuracy will always be significantly less than 1% at extreme quantiles.
cf - the bound value for centroid and digest sizes.