Hierarchy

  • ExpMovingAvg

Properties

Properties

$expMovingAvg: {
    N: NumberExpression;
    alpha?: never;
    input: any;
} | {
    N?: never;
    alpha: NumberExpression;
    input: any;
}

Returns the exponential moving average of numeric expressions applied to documents in a partition defined in the $setWindowFields stage.

Type declaration

  • N: NumberExpression

    An integer that specifies the number of historical documents that have a significant mathematical weight in the exponential moving average calculation, with the most recent documents contributing the most weight.

    You must specify either N or alpha. You cannot specify both.

  • Optional alpha?: never

    A double that specifies the exponential decay value to use in the exponential moving average calculation. A higher alpha value assigns a lower mathematical significance to previous results from the calculation.

    You must specify either N or alpha. You cannot specify both.

  • input: any

    Specifies the expression to evaluate. Non-numeric expressions are ignored.

Type declaration

  • Optional N?: never

    An integer that specifies the number of historical documents that have a significant mathematical weight in the exponential moving average calculation, with the most recent documents contributing the most weight.

    You must specify either N or alpha. You cannot specify both.

  • alpha: NumberExpression

    A double that specifies the exponential decay value to use in the exponential moving average calculation. A higher alpha value assigns a lower mathematical significance to previous results from the calculation.

    You must specify either N or alpha. You cannot specify both.

  • input: any

    Specifies the expression to evaluate. Non-numeric expressions are ignored.

Generated using TypeDoc