Skip to main content

Exact computation of shapley R-squared in polynomial time

Project description

## Q-SHAP: Feature-Specific $R^2$ Values for Tree Ensembles This package is used to compute feature-specific $R^2$ values, following Shapley decomposition of the total $R^2$, for tree ensembles in polynomial time.

This version only takes output from XGBoost, scikit-learn Decision Tree, and scikit-learn GBDT. We are working to update it for random forest in the next version. Please check Q-SHAP Tutorial.ipynb for more usage.

### Citation `bibtex @article{jiang2024feature, title={Feature-Specific Coefficients of Determination in Tree Ensembles}, author={Jiang, Zhongli and Zhang, Dabao and Zhang, Min}, journal={arXiv preprint arXiv:2407.03515}, year={2024} } `

### References - Jiang, Z., Zhang, D., & Zhang, M. (2024). Feature-Specific Coefficients of Determination in Tree Ensembles. arXiv preprint arXiv:2407.03515. - Lundberg, Scott M., et al. “From local explanations to global understanding with explainable AI for trees.” Nature machine intelligence 2.1 (2020): 56-67. - Karczmarz, Adam, et al. “Improved feature importance computation for tree models based on the Banzhaf value.” Uncertainty in Artificial Intelligence. PMLR, 2022. - Bifet, Albert, Jesse Read, and Chao Xu. “Linear tree shap.” Advances in Neural Information Processing Systems 35 (2022): 25818-25828. - Chen, Tianqi, and Carlos Guestrin. “Xgboost: A scalable tree boosting system.” Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining. 2016.

### Container images We provide pre-built images with all necessary packages for Q-SHAP in Python 3.11, available for both Docker and Singularity:

  • Docker: You can pull the Docker image using the following command: `sh docker pull catstat/xai `

  • Singularity: You can pull the Docker image using the following command: `sh singularity pull docker://catstat/xai:0.0 `

### Task List

  • [ ] Task 1: Lightgbm version

  • [ ] Task 2: Catboost version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qshap-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

qshap-0.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file qshap-0.1.0.tar.gz.

File metadata

  • Download URL: qshap-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for qshap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d4f939c9dea7cc3cd9eaf57b4a75fe8cb3b9e2a26134b45cf9bded660520e69
MD5 40c69cbff995a2f9fabd3b5da8c18590
BLAKE2b-256 14a8ff92eeb7b4de6ba6076a040792f9113de8ac0fd5237fdacdb7834d929198

See more details on using hashes here.

File details

Details for the file qshap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qshap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for qshap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0be6a7a80ee9c76fa548b4b42c9786d54f541fd0a962e6d15a3ebc126c9d0a47
MD5 0b5672f23c14b8e53169707f503ba8f9
BLAKE2b-256 0ffdfcdddbdf04a3b53b914333427d19135a13dcf087b311b1ad7134cccee335

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page