-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store data frequencies in tree nodes of RF (#3647)
The RF model should store the number of data points associated with each tree node. This information is useful in many ways, including: * Visualizing the trees * Debugging performance problem * Computing SHAP values using the TreeSHAP algorithm To that end, this PR does the following: * Add the `instance_count` field in the `SparseTreeNode` structure * Expose the `instance_count` field in the JSON dump * Add a unit test to ensure that the counts in the JSON dump are correct. Note that this feature will work with the new backend only. If the old backend is used, `instance_count` field will be absent in the JSON dump. Closes #3131 Authors: - Philip Hyunsu Cho (@hcho3) Approvers: - John Zedlewski (@JohnZed) URL: #3647
- Loading branch information
Showing
5 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters