Class CharEmStdOperator
java.lang.Object
io.deephaven.engine.table.impl.updateby.UpdateByOperator
io.deephaven.engine.table.impl.updateby.internal.BaseDoubleUpdateByOperator
io.deephaven.engine.table.impl.updateby.emstd.BasePrimitiveEmStdOperator
io.deephaven.engine.table.impl.updateby.emstd.CharEmStdOperator
Compute an exponential moving standard deviation for a char 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.
-
Nested Class Summary
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.updateby.emstd.BasePrimitiveEmStdOperator
control, emaSource, maybeEmaInnerSource, opAlpha, opOneMinusAlpha, reverseWindowScaleUnits, valueSource
Fields inherited from class io.deephaven.engine.table.impl.updateby.internal.BaseDoubleUpdateByOperator
maybeInnerSource, outputSource
Fields inherited from class io.deephaven.engine.table.impl.updateby.UpdateByOperator
affectingColumns, forwardWindowScaleUnits, inputModifiedColumnSet, isWindowed, outputModifiedColumnSet, pair, rowRedirection, timestampColumnName
-
Constructor Summary
ConstructorDescriptionCharEmStdOperator
(@NotNull MatchPair pair, @NotNull String[] affectingColumns, @NotNull OperationControl control, @Nullable String timestampColumnName, double windowScaleUnits) An operator that computes an exponential moving standard deviation from a char column using an exponential decay function. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create an uninitialized copy of this operator.makeUpdateContext
(int affectedChunkSize, int influencerChunkSize) Make anUpdateByOperator.Context
suitable for use with updates.Methods inherited from class io.deephaven.engine.table.impl.updateby.emstd.BasePrimitiveEmStdOperator
applyOutputShift, handleBadData, initializeCumulative, initializeSources, prepareForParallelPopulation, startTrackingPrev
Methods inherited from class io.deephaven.engine.table.impl.updateby.internal.BaseDoubleUpdateByOperator
clearOutputRows, getOutputColumns
Methods inherited from class io.deephaven.engine.table.impl.updateby.UpdateByOperator
createInputModifiedColumnSet, createOutputModifiedColumnSet, extractDownstreamModifiedColumnSet, finishUpdate, getAffectingColumnNames, getFwdWindowUnits, getInputColumnNames, getInputModifiedColumnSet, getOutputColumnNames, getOutputModifiedColumnSet, getPrevWindowUnits, getTimestampColumnName, initializeRolling, requiresRowPositions
-
Constructor Details
-
CharEmStdOperator
public CharEmStdOperator(@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 char column using an exponential decay function.- Parameters:
pair
- theMatchPair
that defines the input/output for this operationaffectingColumns
- the names of the columns that affect this emacontrol
- defines how to handlenull
input values.timestampColumnName
- the name of the column containing timestamps for time-based calcuationswindowScaleUnits
- the smoothing window for the EMA. If notimestampColumnName
is provided, this is measured in ticks, otherwise it is measured in nanoseconds
-
-
Method Details
-
copy
Description copied from class:UpdateByOperator
Create an uninitialized copy of this operator.UpdateByOperator.initializeSources(Table, RowRedirection)
must be called before this operator can be used.- Specified by:
copy
in classUpdateByOperator
- Returns:
- a copy of this operator
-
makeUpdateContext
@NotNull public UpdateByOperator.Context makeUpdateContext(int affectedChunkSize, int influencerChunkSize) Description copied from class:UpdateByOperator
Make anUpdateByOperator.Context
suitable for use with updates.- Specified by:
makeUpdateContext
in classUpdateByOperator
- Parameters:
affectedChunkSize
- The maximum size of affected chunks that will be provided during the update.influencerChunkSize
- The maximum size of influencer chunks that will be provided during the update.- Returns:
- a new context
-