shap

以賽局理論方法解釋任何機器學習模型的輸出。

shap 是什麼?

以賽局理論方法解釋任何機器學習模型的輸出。 (原文:A game theoretic approach to explain the output of any machine learning model.)

shap 概覽

這是什麼

SHAP(SHapley Additive exPlanations)是一種基於賽局理論的方法,用於解釋任何機器學習模型的輸出。它透過經典的 Shapley 值及其相關延伸,將最適信用分配與局部解釋連結起來。

主要功能

  • 使用賽局理論的 Shapley 值解釋任何機器學習模型 - 針對樹集成方法(XGBoost、LightGBM、CatBoost、scikit-learn、pyspark)提供高速精確演算法 - DeepExplainer 支援 TensorFlow/Keras 模型(初步支援 PyTorch) - GradientExplainer 支援 TensorFlow/Keras/PyTorch 模型 - 特別支援自然語言模型(Hugging Face transformers) - 多種視覺化選項:瀑布圖、力圖、散佈圖、蜂群圖、長條圖、文字圖、影像圖

使用情境

  • 解釋樹集成模型預測(例如 XGBoost、LightGBM) - 解讀深度學習模型輸出(TensorFlow/Keras/PyTorch) - 理解自然語言模型決策(transformers) - 視覺化資料集中的特徵貢獻與交互作用

快速開始

從 PyPI 或 conda-forge 安裝 SHAP: pip install shap 或 conda install -c conda-forge shap 若要啟用 GPU 加速的 Tree SHAP,請安裝 CUDA 支援: pip install shap[cuda]

授權與價格

採用 MIT 開放原始碼授權。免費使用。

內容整理自該專案公開的 README 與儲存庫資訊。

將此徽章加入你的 README

Featured on YunoDB 徽章樣式與說明

你是這個專案的維護者嗎?展示它已收錄於 YunoDB。

Markdown[![Featured on YunoDB](https://yunodb.com/badge/shapshap.svg)](https://yunodb.com/tools/shapshap?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/shapshap?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/shapshap.svg" alt="Featured on YunoDB" height="20"></a>