aggregation#
Source code: sensai/util/aggregation.py
- class RelativeFrequencyCounter[source]#
Bases:
ToStringMixin
Counts the absolute and relative frequency of an event
- count(is_relevant_event) None [source]#
Adds to the count. The nominator is incremented only if we are counting a relevant event. The denominator is always incremented.
- Parameters:
is_relevant_event – whether we are counting a relevant event
- add(relative_frequency_counter: RelativeFrequencyCounter) None [source]#
Adds the counts of the given counter to this object
- Parameters:
relative_frequency_counter – the counter whose data to add
- class DistributionCounter[source]#
Bases:
ToStringMixin
Supports the counting of the frequencies with which (mutually exclusive) events occur
- class WeightedMean[source]#
Bases:
ToStringMixin
Computes a weighted mean of values