-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
part:data-pipelineAffects the data pipelineAffects the data pipelinepriority:URGENTAddress this immediately or the sky will fallAddress this immediately or the sky will fallresolution:wontfixThis will not be worked onThis will not be worked ontype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Description
What's needed?
A weighted moving average implementation that updates the avg whenever a new data sample arrives from the stream.
Proposed solution
We can use the MovingWindow class. Whenever the MovingWindow gets updated it triggers the update of the mean.
Right now, the MovingWindow doesn't support sending events on update.
We propose two different implementation approaches.
- Add a output trigger channel that informs downstream actors about an update of the window.
- The moving average is implemented as part of the
MovingWindowand downstream users can request an output channel.
The weights can be user defined by an iterator of weights. When no weight is provided the average is supposed to return the arithmetic average. We might also want to provide a couple of defaults, e.g. exponential.
Example
window = MovingWindow(100, resampled_data_recv)
# use the latest three values for the weighted average
ma_recv = window.moving_avg(weights=[0.2, 0.3, 0.5])
...Example (exponential)
window = MovingWindow(100, resampled_data_recv)
# use the latest three values for the weighted average
ma_recv = window.moving_avg(exponential_weights(num=10))
...Use cases
The main use case is feature extraction for ML applications.
Alternatives and workarounds
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
part:data-pipelineAffects the data pipelineAffects the data pipelinepriority:URGENTAddress this immediately or the sky will fallAddress this immediately or the sky will fallresolution:wontfixThis will not be worked onThis will not be worked ontype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Type
Projects
Status
Done