solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-15569: Split on the right subtree when node value == threshold on MultipleAdditiveTreesModel

Open spyk opened this issue 4 years ago • 2 comments

https://issues.apache.org/jira/browse/SOLR-15569

Description

Fixes an issue where the MultipleAdditiveTreesModel does not split correctly when the tree node value equals the split threshold. This was discovered while testing a translated XGBoost model for LTR and getting slightly different score results.

NOTE: The previous logic split to the left and also added a NODE_SPLIT_SLACK that has been removed. Not sure if this original logic was part of another model, or served another purpose.

Solution

  • Changed split logic to split on the right subtree when the node value equals the threshold
  • Removed NODE_SPLIT_SLACK completely

Tests

  • Added TestMultipleAdditiveTreesModel.testMultipleAdditiveTreesSplitAtThreshold test to showcase the issue

Checklist

Please review the following and check all that apply:

  • [X] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • [X] I have created a Jira issue and added the issue ID to my pull request title.
  • [X] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • [X] I have developed this patch against the main branch.
  • [X] I have run ./gradlew check.
  • [X] I have added tests for my changes.
  • [ ] I have added documentation for the Reference Guide

spyk avatar Jul 30 '21 15:07 spyk

I took a stab on the 'splitToRight' flag implementation. Please review and let me know of any issues, thanks!

spyk avatar Sep 24 '21 18:09 spyk

This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the [email protected] mailing list. Thank you for your contribution!

github-actions[bot] avatar Feb 25 '24 00:02 github-actions[bot]