Class SketchFrequencies.GlobalSketch<InputT>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<InputT>,org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>>>
-
- org.apache.beam.sdk.extensions.sketching.SketchFrequencies.GlobalSketch<InputT>
-
- Type Parameters:
InputT- the type of the elements in the inputPCollection
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- SketchFrequencies
public 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>>>
Implementation ofSketchFrequencies.globally().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GlobalSketch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theconfidencevalue, i.e.SketchFrequencies.GlobalSketch<InputT>withRelativeError(double eps)Sets the relative errorepsilon.-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Method Detail
-
withRelativeError
public SketchFrequencies.GlobalSketch<InputT> withRelativeError(double eps)
Sets the relative errorepsilon.Keep in mind that the lower the
epsilonvalue, the greater the width.- Parameters:
eps- the error relative to the total number of distinct elements
-
withConfidence
public SketchFrequencies.GlobalSketch<InputT> withConfidence(double conf)
Sets theconfidencevalue, i.e. the probability that the relative error is lower or equal toepsilon.Keep in mind that the greater the confidence, the greater the depth.
- Parameters:
conf- the confidence in the result to not exceed the relative error
-
expand
public org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>> expand(org.apache.beam.sdk.values.PCollection<InputT> input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<InputT>,org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>>>
-
-