Repository: mahout
Updated Branches:
  refs/heads/master 292b718a6 -> 00a2883ec


fixing a scoring problem


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/a511d6f4
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/a511d6f4
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/a511d6f4

Branch: refs/heads/master
Commit: a511d6f45e88a133c16469fefb8087fa2dab7d94
Parents: 292b718
Author: pferrel <[email protected]>
Authored: Fri Oct 21 12:37:50 2016 -0700
Committer: pferrel <[email protected]>
Committed: Fri Oct 21 12:37:50 2016 -0700

----------------------------------------------------------------------
 .../scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/a511d6f4/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
----------------------------------------------------------------------
diff --git 
a/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala 
b/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
index a10b942..b8d9041 100644
--- 
a/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
+++ 
b/math-scala/src/main/scala/org/apache/mahout/math/cf/SimilarityAnalysis.scala
@@ -318,7 +318,7 @@ object SimilarityAnalysis extends Serializable {
     crossCooccurrence: Boolean = true,
     minLLROpt: Option[Double] = None) = {
 
-    val minLLR = minLLROpt.getOrElse(0.0d) // accept all values if not 
specified
+    //val minLLR = minLLROpt.getOrElse(0.0d) // accept all values if not 
specified
 
     drm.mapBlock() {
       case (keys, block) =>
@@ -351,7 +351,7 @@ object SimilarityAnalysis extends Serializable {
               // val candidate = thingA -> normailizedLLR
 
               // Enqueue item with score, if belonging to the top-k
-              if(candidate._2 >= minLLR) { // llr threshold takes precedence 
over max per row
+              if(minLLROpt.nonEmpty && candidate._2 >= minLLROpt.get) {//llr 
threshold takes precedence over max per row
                 if (topItemsPerThing.size < maxInterestingItemsPerThing) {
                   topItemsPerThing.enqueue(candidate)
                 } else if (orderByScore.lt(candidate, topItemsPerThing.head)) {

Reply via email to