[
https://issues.apache.org/jira/browse/MAHOUT-881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Grant Ingersoll updated MAHOUT-881:
-----------------------------------
Attachment: MAHOUT-881.patch
This patch converts TopItems to use Lucene PQ and removes unnecessary sorts,
etc. It fails on one test due to the fact that the old code does not provide a
total ordering on the SimilarUser object (it does not honor the x.compare(y) ==
0 implies x.equals(y) suggestion of Comparable) which means that in the
GenericUserBasedRecommenderTest.testMostSimilar() asserts that the returned
item is #4, but my version returns #3, which has the same score as #4. This is
because I break ties using the id.
> Refactor TopItems to use Lucene's PriorityQueue and remove excessive sorting
> ----------------------------------------------------------------------------
>
> Key: MAHOUT-881
> URL: https://issues.apache.org/jira/browse/MAHOUT-881
> Project: Mahout
> Issue Type: Improvement
> Affects Versions: 0.6
> Reporter: Grant Ingersoll
> Assignee: Grant Ingersoll
> Priority: Minor
> Attachments: MAHOUT-881.patch
>
>
> TopItems.getTop*() all do a fair number of excessive operations that can be
> replaced by switching to using Lucene's PriorityQueue implementation, which
> is more efficient and faster than Java's built in PQ implementation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira