accumulators
accumulators copied to clipboard
How to implement a new statistical class rolling_weighted_mean?
It is complexed to mix rolling and weighted. thanks very much.
it depends what kind of functionality you want. you can just add a weight that will be stored together with the value and treated similarly to how "weighted_mean" is using the weight (just multiply with the value). another option is to have fixed weights associated with the positions in the window (= a filter), here the implementation is different, but should not be too complex.