带交互作用的ibreakdown模型不可知论解释
ibreakdown的Python项目详细描述
算法
算法基于论文“iBreakDown:模型的不确定性”中描述的思想 非加性预测模型“https://arxiv.org/abs/1903.11420和 R(iBreakDown)中的引用实现
算法背后的直觉如下:
The algorithm works in a similar spirit as SHAP or Break Down but is not restricted to additive effects. The intuition is the following: 1. Calculate a single-step additive contribution for each feature. 2. Calculate a single-step contribution for every pair of features. Subtract additive contribution to assess the interaction specific contribution. 3. Order interaction effects and additive effects in a list that is used to determine sequential contributions. This simple intuition may be generalized into higher order interactions.
深入的解释可以在算法作者免费书籍中找到: 预测模型:探索、解释和调试https://pbiecek.github.io/PM_VEE/iBreakDown.html
简单示例
# model = RandomForestClassifier(...)explainer=ClassificationExplainer(model)classes=['Deceased','Survived']explainer.fit(X_train,columns,classes)exp=explainer.explain(observation)exp.print()
请查看完整的泰坦尼克号示例:https://github.com/jettify/ibreakdown/blob/master/examples/titanic.py
^{pr2}$特点
- 支持分类和回归的预测解释
- 易于使用的API。在
- 与pandas和numpy
- 支持功能之间的交互
安装
安装过程简单,只需:
$ pip install ibreakdown
变更
- 项目
标签: