utils.tracker.multi_value#
Classes
|
A Tracker for storing multiple values at once in the form of a dict mapping from keys to individual Trackers. |
- class utils.tracker.multi_value.MultiValueTracker(base_tracker)[source]#
Bases:
TrackerA Tracker for storing multiple values at once in the form of a dict mapping from keys to individual Trackers.
- get_normalized()[source]#
Normalizes the tracked values by dividing them through the sum of the values.
- update(values)[source]#
Adds one value for tracked object to the tracker.
Note
Whenever the input dictionary contains a new key not stored in the Tracker, it will be added to its storage.
- Parameters:
values (dict) – A dictionary mapping from keys to numeric values to be added to the tracker.
- Return type:
Tracker