Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-692

OnlineSummarizer does not tolerate fewer than 100 samples

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.4
    • 0.6
    • None
    • None

    Description

      If fewer than 100 samples are add()ed to an instance of org.apache.mahout.math.stats.OnlineSummarizer an exception will be thrown during a sort when getQuartile() is called:

      Caused by: java.lang.IndexOutOfBoundsException: from: 0, to: 99, size=89

      at org.apache.mahout.math.list.AbstractList.checkRangeFromTo(AbstractList.java:87)
      at org.apache.mahout.math.list.DoubleArrayList.sortFromTo(DoubleArrayList.java:573)
      at org.apache.mahout.math.stats.OnlineSummarizer.sort(OnlineSummarizer.java:116)
      at org.apache.mahout.math.stats.OnlineSummarizer.getQuartile(OnlineSummarizer.java:129)

      The problem is that sort is on index range 0,99 but 0,n-1 should be used.

      Attachments

        Activity

          People

            tdunning Ted Dunning
            pbaclace Paul Baclace
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: