Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12389

Add variance and standard deviation to AttributeRollingWindow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M1, 1.24.0
    • Extensions
    • None

    Description

      AttributeRollingWindow currently uses state to calculate metrics like sum, count, and mean (average) for a rolling time window (optionally using sub-windows to use smaller aggregates to estimate metrics for a larger total time window as it stores the window values in state).

      Variance and its positive square root (standard deviation) are other helpful univariate statistics. Using "online" algorithms such as Welford's method adds no extra memory requirement and runs in constant time. Apache Commons Math3 has such an implementation and could be used to add attributes to the FlowFile for variance and standard deviation. These metrics can be used for filtering out noise downstream, for example RouteOnAttribute and/or stateful UpdateAttribute where the current attribute value is more than 2 standard deviations away from the mean.

      Attachments

        Issue Links

          Activity

            People

              mattyb149 Matt Burgess
              mattyb149 Matt Burgess
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m