[
https://issues.apache.org/jira/browse/MAHOUT-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13594857#comment-13594857
]
Sebastian Schelter commented on MAHOUT-1151:
--------------------------------------------
1) I removed the cast to a float, thx
regarding 2)
There is a trimming, as topKItems is a fixed size priority queue, so
topKItems.peek() will always give the currently smallest value that is still
included (aka the threshold). Correct me if I'm wrong.
{code}
if (topKItems.size() < recommendationsPerUser || predictedRating >
topKItems.peek().getValue()) {
topKItems.offer(new GenericRecommendedItem(itemID, (float)
predictedRating));
}
{code}
My suspicion was that the instantiation of objects given to the offer() method
might cause problems.
> Object reuse in distributed ALS
> -------------------------------
>
> Key: MAHOUT-1151
> URL: https://issues.apache.org/jira/browse/MAHOUT-1151
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.8
> Reporter: Sebastian Schelter
> Assignee: Sebastian Schelter
> Attachments: MAHOUT-1151.patch
>
>
> In order to improve the performance our distributed ALS code, we should try
> to avoid object instantiation as much as possible, especially when it is done
> per input tuple.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira