SHAP 统一的方法解释任何机器学习模型的输出

程序名称:SHAP

授权协议: MIT

操作系统: 跨平台

开发语言: Python

SHAP 介绍

SHAP(SHapley Additive exPlanations)以一种统一的方法来解释任何机器学习模型的输出。
SHAP将博弈论与局部解释联系起来,将以前的几种方法结合起来,并根据预期表示唯一可能的一致且局部准确的加法特征归因方法(详见SHAP NIPS
paper
论文)。

虽然SHAP值可以解释任何机器学习模型的输出,但我们已经开发了一种用于树集合方法的高速精确算法(Tree SHAP arXiv paper)。
XGBoost,LightGBM,CatBoost和scikit-learn树模型支持快速C ++实现:

import xgboost
import shap

# load JS visualization code to notebook
shap.initjs()

# train XGBoost model
X,y = shap.datasets.boston()
model = xgboost.train({"learning_rate": 0.01}, xgboost.DMatrix(X, label=y), 100)

# explain the model's predictions using SHAP values
# (same syntax works for LightGBM, CatBoost, and scikit-learn models)
explainer = shap.TreeExplainer(model)
shap_values = explainer.shap_values(X)

# visualize the first prediction's explanation (use matplotlib=True to avoid Javascript)
shap.force_plot(explainer.expected_value, shap_values[0,:], X.iloc[0,:])

SHAP 官网

https://github.com/slundberg/shap

相关编程语言

欧盟第7框架计划(FP7)的LarKC项目的目标是开发大规模...
Salad 是一种有效且灵活的实现著名的异常检测方法回...
multilanguage 是一个多语开发工具包,用于缓存多语...
go-cortex 是一个服务,通过倾听你的句子,并视图理...
DKPro Core 是基于 Apache UIMA 框架之上的自然语言...
NLTK 会被自然地看作是具有栈结构的一系列层,这些层...