Core Server
  1. Core Server
  2. SERVER-5044

$stdDev aggregation operator for standard deviation

    Details

    • Backport:
      No
    • # Replies:
      8
    • Last comment by Customer:
      true
    • Driver changes needed?:
      Driver changes needed

      Description

      see https://gist.github.com/1886960 for an algorithm to handle calculating standard deviation and variance across many servers.

        Issue Links

          Activity

          Hide
          Chris Westin
          added a comment -

          I'm assuming this is meant to be for $group.

          Show
          Chris Westin
          added a comment - I'm assuming this is meant to be for $group.
          Hide
          Mathias Stearn
          added a comment -

          Correct.

          Ideally any $group op should be usable in a $project against an array field, but that is a different issue.

          Show
          Mathias Stearn
          added a comment - Correct. Ideally any $group op should be usable in a $project against an array field, but that is a different issue.
          Hide
          Justin
          added a comment -

          I started this today. Here is the commit in github. https://github.com/base698/mongo/commit/2f9ab97ffb6f027faf4c503ba4a58e500eb6fb23

          It needs tests and variance. It probably could be refactored to do average, variance and standard deviation in one motion since you have to do it incrementally.

          Show
          Justin
          added a comment - I started this today. Here is the commit in github. https://github.com/base698/mongo/commit/2f9ab97ffb6f027faf4c503ba4a58e500eb6fb23 It needs tests and variance. It probably could be refactored to do average, variance and standard deviation in one motion since you have to do it incrementally.
          Hide
          Matt Kangas
          added a comment -
          Show
          Matt Kangas
          added a comment - Closed https://github.com/mongodb/mongo/pull/409 due to inactivity
          Hide
          Ranjith Ramachandra
          added a comment -

          Any idea if this will be picked up at all?

          Show
          Ranjith Ramachandra
          added a comment - Any idea if this will be picked up at all?
          Hide
          Michael Svendsen
          added a comment -

          I opened a pull request for this today. https://github.com/mongodb/mongo/pull/464

          This implements standard deviation and variance calculations using the algorithm listed in the description.

          Show
          Michael Svendsen
          added a comment - I opened a pull request for this today. https://github.com/mongodb/mongo/pull/464 This implements standard deviation and variance calculations using the algorithm listed in the description.
          Hide
          auto
          added a comment -

          Author:

          {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

          Message: Clean up AccumulatorAvg

          Major change is not inheriting from AccumulatorSum

          Prep for SERVER-5044 $stdDev accumulator
          Branch: master
          https://github.com/mongodb/mongo/commit/982d5d281806d470696809d11dceaa098aed4906

          Show
          auto
          added a comment - Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'} Message: Clean up AccumulatorAvg Major change is not inheriting from AccumulatorSum Prep for SERVER-5044 $stdDev accumulator Branch: master https://github.com/mongodb/mongo/commit/982d5d281806d470696809d11dceaa098aed4906
          Hide
          Kevin Davenport
          added a comment -

          This is a must have.

          Show
          Kevin Davenport
          added a comment - This is a must have.

            People

            • Votes:
              18 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since reply:
                13 weeks, 6 days ago
                Date of 1st Reply: