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

Last batch is not filled correctly in MultithreadedBatchItemSimilarities

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.10.0
    • Labels:
      None

      Description

      In MultithreadedBatchItemSimilarities method queueItemIDsInBatches handles last batch incorrectly. Last batch length is calculated incorrectly. As a result last batch is either truncated or too long with superfluous positions filled with item indexes from previous batch (or zeros if it is also the first batch as in attached test).

      Attached test fails for very short model (with only 4 items) with NoSuchItemException.

      Attached patch corrects this issue.

        Attachments

          Activity

            People

            • Assignee:
              ssc Sebastian Schelter
              Reporter:
              jbojar Jarosław Bojar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: