Represents the current state for an online algorithm.
Base trait for online algorithms used on time series.
Delays the values by the window size.
Delays the values by the window size. This is similar to the :offset
operator
except that it can be applied to any input line instead of just changing the time
window fetched with a DataExpr. Short delays can be useful for alerting to detect
changes in slightly shifted trend lines.
Computes the rate of change per step of the input time series.
Helper to compute DES value iteratively for a set of numbers.
Helper to compute DES value iteratively for a set of numbers.
Number of samples to record before emitting predicted values.
Data smoothing factor.
Trend smoothing factor.
Ignore the first N datapoints that are passed in.
Ignore the first N datapoints that are passed in. This is typically used to achieve an initial alignment to step boundaries when using a deterministic sliding window approach like SDES.
Sum the values across the evaluation context.
Sum the values across the evaluation context. This is typically used to approximate the distinct number of events that occurred. If the input is non-negative, then each datapoint for the output line will represent the area under the input line from the start of the graph to the time for that datapoint.
Keeps track of the number of true values within a given window.
Keeps track of the number of true values within a given window. A value is considered as true if it is not near zero. This is frequently used to check for a number of occurrences before triggering an alert.
Keeps track of the maximum value within a given window.
Keeps track of the maximum value within a given window. This is typically used as a way to get a smooth upper bound line that closely tracks a noisy input.
Mean of the values within a moving window of the input.
Mean of the values within a moving window of the input. The denominator is the number of values (non-NaN entries) in the rolling buffer.
Rolling buffer to keep track of the input for a given window.
Minimum number of values that must be present within the buffer for an average to be emitted. If there are not enough non-NaN values, then NaN will be emitted.
Keeps track of the minimum value within a given window.
Keeps track of the minimum value within a given window. This is typically used as a way to get a smooth lower bound line that closely tracks a noisy input.
Sum of the values within a moving window of the input.
Sum of the values within a moving window of the input.
Rolling buffer to keep track of the input for a given window.
Alternate between two DES functions after each training period.
Alternate between two DES functions after each training period. This provides a deterministic estimate within a bounded amount of time.
Number of samples to record before emitting predicted values.
Data smoothing factor.
Trend smoothing factor.
Keeps track of the number of true values within a given window.
Keeps track of the number of true values within a given window. A value is considered as true if it is not near zero. This is frequently used to check for a number of occurrences before triggering an alert.
Push a value through a sequence of online algorithms and return the result.
Buffer for tracking the last N values of a time series.
Helper functions to make it easier to create state objects.
Represents the current state for an online algorithm. Can be used with
OnlineAlgorithm.apply
to create a new instance with the same state. This state object is reliably serializable with helpers such as theatlas-json
library so state can be persisted.