mean(self, *args, update=None, update_times=None, **kwargs)
New values to continue calculating the exponentially weighted mean from the last values and weights. Values should be float64 dtype.
update
needs to be None
the first time the exponentially weighted mean is calculated.
New times to continue calculating the exponentially weighted mean from the last values and weights. If None
, values are assumed to be evenly spaced in time. This feature is currently unsupported.
Calculate an online exponentially weighted mean.
>>> df = pd.DataFrame({"a": range(5), "b": range(5, 10)})This example is valid syntax, but we were not able to check execution
... online_ewm = df.head(2).ewm(0.5).online()
... online_ewm.mean() a b 0 0.00 5.00 1 0.75 5.75
>>> online_ewm.mean(update=df.tail(3)) a b 2 1.615385 6.615385 3 2.550000 7.550000 4 3.520661 8.520661This example is valid syntax, but we were not able to check execution
>>> online_ewm.reset()See :
... online_ewm.mean() a b 0 0.00 5.00 1 0.75 5.75
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them