You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/08/05 09:50:43 UTC

[GitHub] [solr] cpoerschke commented on a change in pull request #242: SOLR-15569: Split on the right subtree when node value == threshold on MultipleAdditiveTreesModel

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



##########
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:
       The `==` going left or right is an interesting question! One way to maintain backwards compatibility whilst supporting "go right instead of left" could be via an optional configuration element e.g.
   
   ```
   - "params" : { "trees" : [ ... ] }
   + "params" : { "trees" : [ ... ], "splitToRight" : true }
   ```
   
   And if there is a `scoreNode` change then `explainNode` requires a matching change I think.




-- 
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-unsubscribe@solr.apache.org

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



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