https://github.com/yupbank/linear_tree_shap
https://github.com/yupbank/linear_tree_shap
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yupbank/linear_tree_shap
- Owner: yupbank
- Created: 2022-02-21T20:03:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-17T00:18:50.000Z (over 2 years ago)
- Last Synced: 2025-03-18T09:51:35.700Z (3 months ago)
- Language: Python
- Size: 78.1 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Linear Tree Shap
---
Compute exact Shapley value for decision trees in Linear time.For a tree with maximum depth D, the number of leaves L.
We compute the shapely value is O(LD) time, without the need for extra memory.### Numerical problems
---
- tree depth exceeds 12; there are chances of overflow with `double` data type.
It can be mitigated using `long double` data type.
- tree depth exceeds 16; even with the `long double` type, there are still chances to overflow.
It can still be mitigated using the `fraction` data type.### No numerical problems with v2
---
By using the interpolation method, we can have a numerical stable solution based on Chebyshev nodes of the first or second kind.