time_stream.aggregation.MeanSum¶
- class time_stream.aggregation.MeanSum(**kwargs)[source]¶
An aggregation class to calculate the mean sum (averaged total) of values within each aggregation period. This will estimate the sum when values are missing according to how many values are expected in the period.
- __init__(**kwargs)¶
Methods
__init__(**kwargs)available()Return a sorted list of available registered keys.
expr(ctx, columns)To calculate the mean sum the expression must return the mean, and be multiplied by the expected counts, which is calculated after in the post_expr method.
get(spec, **kwargs)Resolve spec to an instance of Self:
post_expr(ctx, columns)Multiply the mean by the expected count to get the mean sum.
register(register_cls)A method used as a decorator for subclasses to add to the register by its name attribute.
Attributes
name