spyk commented on a change in pull request #242:
URL: https://github.com/apache/solr/pull/242#discussion_r683387756



##########
File path: 
solr/contrib/ltr/src/java/org/apache/solr/ltr/model/MultipleAdditiveTreesModel.java
##########
@@ -292,10 +291,10 @@ private static float scoreNode(float[] featureVector, 
RegressionTreeNode regress
         return 0f;
       }
 
-      if (featureVector[regressionTreeNode.featureIndex] <= 
regressionTreeNode.threshold) {
-        regressionTreeNode = regressionTreeNode.left;
-      } else {
+      if (featureVector[regressionTreeNode.featureIndex] >= 
regressionTreeNode.threshold) {

Review comment:
       We run into case with a specific XGBoost model where a variable might 
take on 0 or 1 and the split condition being `1.0`. So, in that case if we go 
left by default the right path is never evaluated, which results in silently 
decreased model performance. 
   
   But, agree it's a rather big change, there might be issues with a) other 
tree models that split to the left b) backwards incompatibility, so @cpoerschke 
suggestion makes a lot of sense.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to