forked from oneapi-src/oneDAL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SHAP calculation to GBT regression (oneapi-src#2460)
* WIP: Add SHAP contributions and interactions add weights to GbtDecisionTree Include TreeShap recursion steps fix buffer overflow in memcpy Add cover to GbtDecisionTree from model builder fix some index offsets, correct results for trees up to depth=5 fix: nodeIsDummyLeaf is supposed to check left child remove some debug statements chore: apply oneDAL code style predictContribution wrapper with template dispatching increase speed by reducing number of cache misses use thread-local result accessor backup commit with 13% speedup wrt xgboost add preShapContributions/predShapInteractions as function parameter Revert "introduce pred_contribs and pred_interactions SHAP options" This reverts commit 483aa5b. remove some debug content reset env_detect.cpp to origin/master remove std::vector<float> test by introducing thread-local NumericTable Move treeshap into separate translation unit - caution: treeShap undefined in libonedal builds but segfaults Fix function arguments respect predShapContributions and predShapInteractions options and check for legal combinations tmp: work on pred_interactions * no more segfaults * fix pred_interactions * add fast treeshap v1 * Add combinationSum calculation for Fast TreeSHAP v2 * daal_calloc -> daal_malloc * support shap contribution calculation with Fast TreeSHAP v2 * Consistently add cover to daaal APIs, add output parameters to end of function arguments * align tree cfl/reg APIs * restore .gitignore from master * cleanup for review * add newline * remove defaultLeft value that's not needed * Update model builder examples * Add backwards-compatible model builder API & deprecate decls * fix: remove dead code * fix: simplify number of nodes calculation * chore: typos and code style * Fix bazel build * fix: remove dead member variable in GbtDecisionTree * feat: add first unit tests for model builders * revert dal_module back to daal_module * feat: execute dal unit tests in CI * reorganize how tests are executed * add license * Fix new_ts: nodeIsLeaf/nodeIsDummyLeaf internal usage & classification Parameter * Update TreeVisitor with node cover value * remove deprecation version in comment * remove skipping of XGBoost base_score tree * feature: proper support for XGBoost's base_score value * Update code attributions / cite / license * typo * chore: remove resIncrement from GBT predict * Document functions and separate declarations and implementations * review comments oneapi-src#1 * review comments oneapi-src#2 - fix pImpl idiom * refactor: replace boolean parameters with DAAL_UINT64 flag * fix: usage of bias/margin for LightGBM models * review comments oneapi-src#2 * fixup endless for loop * use TArray, introduce TreeShapVersion enum * use TArray where possible * fix: move data field to implementation class * Update cpp/daal/include/algorithms/tree_utils/tree_utils.h Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com> * add typedef to shorten statements * provide doxygen description of gbt classification funtions * fix some typos * consistently use size_t for node indexing; unsigned -> uint32_t * fix: don't include test in release * fix multiline comments --------- Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com> Co-authored-by: Dmitry Razdoburdin <>
- Loading branch information
Showing
41 changed files
with
2,250 additions
and
449 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
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
Oops, something went wrong.