[mlpack-svn] r16359 - mlpack/trunk/src/mlpack/methods/neighbor_search

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Mar 10 07:51:37 EDT 2014


Author: rcurtin
Date: Mon Mar 10 07:51:37 2014
New Revision: 16359

Log:
Better rule, which forces the score to 0 for AllkNN.  Not sure if it'll work for AllkFN.  Also, I think there may be a bug in the traversal info handling for the BinarySpaceTree DualTreeTraverser.


Modified:
   mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp

Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp	Mon Mar 10 07:51:37 2014
@@ -195,7 +195,7 @@
     // on the query descendant distance and the distance between the query node
     // and last traversal query node, but this case doesn't actually happen for
     // kd-trees or cover trees.
-    adjustedScore = SortPolicy::CombineBest(adjustedScore, bestDistance);
+    adjustedScore = SortPolicy::CombineBest(adjustedScore, adjustedScore);
   }
 
   if (traversalInfo.LastReferenceNode() == referenceNode.Parent())
@@ -217,7 +217,7 @@
     // on the reference descendant distance and the distance between the
     // reference node and last traversal reference node, but this case doesn't
     // actually happen for kd-trees or cover trees.
-    adjustedScore = SortPolicy::CombineBest(adjustedScore, bestDistance);
+    adjustedScore = SortPolicy::CombineBest(adjustedScore, adjustedScore);
   }
 
   // Can we prune?



More information about the mlpack-svn mailing list