whylogs.core.statistics.datatypes.floattracker
¶
Module Contents¶
Classes¶
Track statistics for floating point numbers |
- class whylogs.core.statistics.datatypes.floattracker.FloatTracker(min: float = None, max: float = None, sum: float = None, count: int = None)¶
Track statistics for floating point numbers
- Parameters
min (float) – Current min value
max (float) – Current max value
sum (float) – Sum of the numbers
count (int) – Total count of numbers
- update(self, value: float)¶
Add a number to the tracking statistics
- add_integers(self, tracker)¶
Copy data from a IntTracker into this object, overwriting the current values.
- Parameters
tracker (IntTracker) –
- mean(self)¶
Calculate the current mean
- merge(self, other)¶
Merge this tracker with another.
- Parameters
other (FloatTracker) – The other float tracker
- Returns
merged – A new float tracker
- Return type
- to_protobuf(self)¶
Return the object serialized as a protobuf message
- Returns
message
- Return type
DoublesMessage
- static from_protobuf(message)¶
Load from a protobuf message
- Returns
number_tracker
- Return type