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

Array returned by classifier.bayes.algorithm.CBayesAlgorithm.classifyDocument is sorted ascendant

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 0.4
    • 0.5
    • None
    • Linux

    Description

      The array returned for a n-best call to classifyDocument is sorted ascendant instead of descendant.

      Ex:

      47-best: [ClassifierResult{category='香川県', score=32.28281232047167},
      ClassifierResult{category='宮崎県', score=32.28969992600906}, ......,
      ClassifierResult{category='愛知県', score=32.487981016587796},
      ClassifierResult{category='東京都', score=32.49189358054859},
      ClassifierResult{category='北海道', score=32.49811200756193}]

      (classification of documents for Japanese prefectures)

      Inside the classifyDocument method, just before the return statement we found this line:

      Collections.reverse(result);

      Is this a mistake or a design choice? (we are not sure, hence the "Minor" priority)

      Attachments

        Activity

          People

            robinanil Robin Anil
            mizudera Robin Swezey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified