[
https://issues.apache.org/jira/browse/MAHOUT-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14396123#comment-14396123
]
ASF GitHub Bot commented on MAHOUT-1622:
----------------------------------------
Github user smarthi commented on a diff in the pull request:
https://github.com/apache/mahout/pull/106#discussion_r27775419
--- Diff:
mr/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java
---
@@ -26,7 +26,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import com.google.common.collect.Lists;
+import java.util.ArrayList;
import com.google.common.io.Closeables;
--- End diff --
Go ahead and do it if u like, I have a big change coming up which fixes
some of that stuff.
On Sun, Apr 5, 2015 at 3:12 AM, Anand Avati <[email protected]>
wrote:
> In
>
mr/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java
> <https://github.com/apache/mahout/pull/106#discussion_r27775411>:
>
> > @@ -26,7 +26,7 @@
> > import java.util.concurrent.TimeUnit;
> > import java.util.concurrent.atomic.AtomicInteger;
> >
> > -import com.google.common.collect.Lists;
> > +import java.util.ArrayList;
> > import com.google.common.io.Closeables;
>
> Argh, I blindly replaced only collections! I could have removed Closeables
> as well, would be trivial. I'm assuming you will be doing it, based on
your
> previous comment.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/mahout/pull/106/files#r27775411>.
>
> MultithreadedBatchItemSimilarities outputs incorrect number of similarities.
> ----------------------------------------------------------------------------
>
> Key: MAHOUT-1622
> URL: https://issues.apache.org/jira/browse/MAHOUT-1622
> Project: Mahout
> Issue Type: Bug
> Components: Collaborative Filtering
> Affects Versions: 0.9
> Reporter: Jesse Daniels
> Assignee: Anand Avati
> Priority: Minor
> Labels: legacy
> Fix For: 0.10.0
>
> Attachments: batchSimilarities.patch
>
>
> In some cases the Output class in MultithreadedBatchItemSimilarities does not
> output all of the similarity pairs that it should. It is very possible for
> the number of active workers to go to zero while in the while loop, in which
> case the remaining similarities for the finished workers will not be flushed
> to the output. This is because the while loop is only conditioned on whether
> there are active workers or not. An easy fix is to also check to make sure
> the results structure is not empty. This way both the number of active
> workers must be 0 and the result set must be empty to exit the while loop.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)