whylogs.core.statistics.numbertracker

Module Contents

Classes

NumberTracker

Class to track statistics for numeric data.

Attributes

DEFAULT_HIST_K

logger

whylogs.core.statistics.numbertracker.DEFAULT_HIST_K = 256
whylogs.core.statistics.numbertracker.logger
class whylogs.core.statistics.numbertracker.NumberTracker(variance: whylogs.core.statistics.datatypes.VarianceTracker = None, floats: whylogs.core.statistics.datatypes.FloatTracker = None, ints: whylogs.core.statistics.datatypes.IntTracker = None, theta_sketch: whylogs.core.statistics.thetasketch.ThetaSketch = None, histogram: datasketches.kll_floats_sketch = None, frequent_numbers: whylogs.util.dsketch.FrequentNumbersSketch = None)

Class to track statistics for numeric data.

Parameters
  • variance – Tracker to follow the variance

  • floats – Float tracker for tracking all floats

  • ints – Integer tracker

variance

See above

floats

See above

ints

See above

theta_sketch

Sketch which tracks approximate cardinality

Type

whylabs.logs.core.statistics.thetasketch.ThetaSketch

property count(self)
track(self, number)

Add a number to statistics tracking

Parameters

number (int, float) – A numeric value

merge(self, other)
to_protobuf(self)

Return the object serialized as a protobuf message

static from_protobuf(message: whylogs.proto.NumbersMessage)

Load from a protobuf message

Returns

number_tracker

Return type

NumberTracker

to_summary(self)

Construct a NumberSummary message

Returns

summary – Summary of the tracker statistics

Return type

NumberSummary