Class FloatEmStdOperator


public class FloatEmStdOperator extends BasePrimitiveEmStdOperator
Compute an exponential moving standard deviation for a float column source. The output is expressed as a double value and is computed using the following formula:

variance = alpha * (prevVariance + (1 - alpha) * (x - prevEma)^2)

This function is described in the following document:

"Incremental calculation of weighted mean and variance" Tony Finch, University of Cambridge Computing Service (February 2009) https://web.archive.org/web/20181222175223/http://people.ds.cam.ac.uk/fanf2/hermes/doc/antiforgery/stats.pdf

NOTE: `alpha` as used in the paper has been replaced with `1 - alpha` per the convention adopted by Deephaven.

  • Field Details

  • Constructor Details

    • FloatEmStdOperator

      public FloatEmStdOperator(@NotNull @NotNull MatchPair pair, @NotNull @NotNull String[] affectingColumns, @NotNull @NotNull OperationControl control, @Nullable @Nullable String timestampColumnName, double windowScaleUnits)
      An operator that computes an exponential moving standard deviation from a float column using an exponential decay function.
      Parameters:
      pair - the MatchPair that defines the input/output for this operation
      affectingColumns - the names of the columns that affect this ema
      control - defines how to handle null input values.
      timestampColumnName - the name of the column containing timestamps for time-based calcuations
      windowScaleUnits - the smoothing window for the EMA. If no timestampColumnName is provided, this is measured in ticks, otherwise it is measured in nanoseconds
  • Method Details