[mlpack-git] master: Fix error in adjustedScore calculation. (3150b12)

gitdub at mlpack.org gitdub at mlpack.org
Tue Mar 22 15:23:43 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/11b4b5e99199a2f360eba220ed0abe183fdae410...e3b418918fffce382ce9d8ceee9d9349ca199611

>---------------------------------------------------------------

commit 3150b12118c2c2cefa6265d0a63c3ebe76db274f
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Tue Mar 22 14:53:53 2016 -0300

    Fix error in adjustedScore calculation.


>---------------------------------------------------------------

3150b12118c2c2cefa6265d0a63c3ebe76db274f
 src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp b/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
index 1eb29c4..f4d3712 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
@@ -177,7 +177,7 @@ inline double NeighborSearchRules<SortPolicy, MetricType, TreeType>::Score(
     const double lastRefDescDist =
         traversalInfo.LastReferenceNode()->MinimumBoundDistance();
     adjustedScore = SortPolicy::CombineWorst(score, lastQueryDescDist);
-    adjustedScore = SortPolicy::CombineWorst(score, lastRefDescDist);
+    adjustedScore = SortPolicy::CombineWorst(adjustedScore, lastRefDescDist);
   }
 
   // Assemble an adjusted score.  For nearest neighbor search, this adjusted




More information about the mlpack-git mailing list