whylogs.core.statistics.thetasketch
#
ThetaSketch ObjectsA sketch for approximate cardinality tracking.
A wrapper class for datasketches.update_theta_sketch
which implements
merging for updatable theta sketches.
Currently, datasketches only implements merging for compact (read-only) theta sketches.
#
updateUpdate the statistics tracking
#
Parametersvalue : object Value to follow
#
mergeMerge another ThetaSketch
with this one, returning a new object
#
Parametersother : ThetaSketch Other theta sketch
#
Returnsnew : ThetaSketch New theta sketch with merged statistics
#
get_resultGenerate a theta sketch
#
Returnscompact_sketch : datasketches.compact_theta_sketch Read-only compact theta sketch with full statistics.
#
serializeSerialize this object.
Note that serialization only preserves the object approximately.
#
Returnsmsg : bytes
Serialized to bytes
#
deserializeDeserialize from a serialized message.
msg
#
Parametersmsg : bytes Serialized object. can be a serialized version of:
#
Returnssketch : ThetaSketch ThetaSketch object
#
to_summaryGenerate a summary protobuf message
#
Parametersnum_std_devs : float For estimating bounds
#
Returnssummary : UniqueCountSummary Summary protobuf message
#
numbers_summaryGenerate a summary protobuf message from a thetasketch based on numeric values
#
Parameterssketch
num_std_devs : float For estimating bounds
#
Returnssummary : UniqueCountSummary Summary protobuf message