InputT - the type of the elements in the input PCollectionpublic abstract static class SketchFrequencies.GlobalSketch<InputT> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<InputT>,org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>>>
SketchFrequencies.globally().| Constructor and Description |
|---|
GlobalSketch() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>> |
expand(org.apache.beam.sdk.values.PCollection<InputT> input) |
SketchFrequencies.GlobalSketch<InputT> |
withConfidence(double conf)
Sets the
confidence value, i.e. |
SketchFrequencies.GlobalSketch<InputT> |
withRelativeError(double eps)
Sets the relative error
epsilon. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validatepublic SketchFrequencies.GlobalSketch<InputT> withRelativeError(double eps)
epsilon.
Keep in mind that the lower the epsilon value, the greater the width.
eps - the error relative to the total number of distinct elementspublic SketchFrequencies.GlobalSketch<InputT> withConfidence(double conf)
confidence value, i.e. the probability that the relative error is lower or
equal to epsilon.
Keep in mind that the greater the confidence, the greater the depth.
conf - the confidence in the result to not exceed the relative errorpublic org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>> expand(org.apache.beam.sdk.values.PCollection<InputT> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<InputT>,org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>>>