预测分析-“为什么"因子&模型的可解释性 [英] Predictive Analytics - "why" factor & model interpretability
问题描述
我拥有包含大量x变量的数据,这些变量主要是分类/标称的,而我的目标变量是一个多类标签.我能够建立几个模型来预测多类变量并比较每个变量的执行情况.我有训练和测试数据.培训和测试数据都给了我很好的结果.
现在,我试图找出为什么"该模型预测了某些Y变量?表示是否有天气数据:X变量:城市,州,邮政编码,温度,年份; Y变量:雨,太阳,阴天,雪.我想找出模型为什么要预测的原因":分别是降雨,阳光,多云或下雪.我使用了多名词,决策树等分类算法.
这可能是一个广泛的问题,但我需要一个可以开始研究的地方.我可以预测什么",但看不到它被预测为雨,日,多云或下雪的标签"的原因".基本上,我试图找到导致预测变量的变量之间的链接.
到目前为止,我考虑过使用相关矩阵,主成分分析(在模型构建过程中发生)...至少是要看看哪些是好的预测变量,而哪些不是.有没有办法弄清楚为什么"因素?
感谢一堆!
模型可解释性是当前研究(例如圣杯之类的东西)活跃度很高且非常热门的领域,近年来,由于深度学习模型在各种任务中的成功(通常是巨大的成功),加上算法公平性和可操作性的必要性,已经提出了这一点.问责制...
除了深入的理论研究之外,还有一些工具箱和工具箱.最近在实用级别上的库,既用于神经网络,也用于其他常规ML模型;以下是部分清单,可以说应该让您忙一段时间:
-
Google提供的假设分析工具,这是开源TensorBoard Web应用程序的一项全新功能(2018年9月),使用户无需编写代码即可分析ML模型(博客文章)
-
Geoff Hinton最近(2017年11月)的论文,将神经网络提炼成软决策树,并具有独立的 PyTorch实现
-
SHAP:解释模型预测的统一方法(论文,作者的 Python代码,纸张,作者的代码;论文:功能可视化,纸张,代码,纸张, 代码, ICML 2018论文, tensorflow代码)
-
Grad-CAM:深度网络通过基于梯度的本地化的视觉解释(纸张 ,作者的火炬代码, PyTorch代码,Keras 示例笔记本)
-
GAN解剖:MIT CSAIL的可视化和理解生成的对抗网络(项目页面,以及指向纸张和代码的链接)
- Microsoft的
-
InterpretML(仍在Alpha中的代码)
最后,随着可解释性向主流发展,已经有框架和工具箱结合了以上提到和链接的一种以上算法和技术;这是Python内容的列表(再次,部分):
另请参阅:
-
一个 Twitter线程,它链接到可用于R的几种解释工具. /p>
-
...和
This may be a broad question but I need somewhere I can start researching. I can predict "what" but I can't see "why" it was predicted as rain, sun, cloudy, or snow label. Basically, I am trying to find the links between the variables that caused to predict the variable.
So far I thought of using correlation matrix, principal component analysis (that happened during model building process)...at least to see which are good predictors and which ones are not. Is there is a way to figure out "why" factor?
Thanks a bunch!
解决方案Model interpretability is a hyper-active and hyper-hot area of current research (think of holy grail, or something), which has been brought forward lately not least due to the (often tremendous) success of deep learning models in various tasks, plus the necessity of algorithmic fairness & accountability...
Apart from the intense theoretical research, there have been some toolboxes & libraries on a practical level lately, both for neural networks as well as for other general ML models; here is a partial list which arguably should keep you busy for some time:
The What-If tool by Google, a brand new (September 2018) feature of the open-source TensorBoard web application, which let users analyze an ML model without writing code (project page, blog post)
The Layer-wise Relevance Propagation (LRP) toolbox for neural networks (paper, project page, code, TF Slim wrapper)
FairML: Auditing Black-Box Predictive Models, by Cloudera Fast Forward Labs (blog post, paper, code)
LIME: Local Interpretable Model-agnostic Explanations (paper, code, blog post, R port)
Black Box Auditing and Certifying and Removing Disparate Impact (authors' Python code)
A recent (November 2017) paper by Geoff Hinton, Distilling a Neural Network Into a Soft Decision Tree, with an independent PyTorch implementation
SHAP: A Unified Approach to Interpreting Model Predictions (paper, authors' Python code, R package)
Interpretable Convolutional Neural Networks (paper, authors' code)
Lucid, a collection of infrastructure and tools for research in neural network interpretability by Google (code; papers: Feature Visualization, The Building Blocks of Interpretability)
SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability (paper, code, Google blog post)
TCAV: Testing with Concept Activation Vectors (ICML 2018 paper, Tensorflow code)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization (paper, authors' Torch code, Tensorflow code, PyTorch code, Keras example notebook)
Network Dissection: Quantifying Interpretability of Deep Visual Representations, by MIT CSAIL (project page, Caffe code, PyTorch port)
GAN Dissection: Visualizing and Understanding Generative Adversarial Networks, by MIT CSAIL (project page, with links to paper & code)
Explain to Fix: A Framework to Interpret and Correct DNN Object Detector Predictions (paper, code)
InterpretML by Microsoft (code still in alpha)
Anchors: High-Precision Model-Agnostic Explanations (paper, code)
Diverse Counterfactual Explanations (DiCE) by Microsoft (paper, code, blog post)
Finally, as interpretability moves toward the mainstream, there are already frameworks and toolboxes that incorporate more than one of the algorithms and techniques mentioned and linked above; here is an (again, partial) list for Python stuff:
- tf-explain - interpretability methods as Tensorflow 2.0 callbacks (code, docs, blog post)
- Skater, by Oracle (code, docs)
- Alibi, by SeldonIO (code, docs)
- AI Explainability 360, by IBM (code, blog post)
See also:
Interpretable Machine Learning, an online Gitbook by Christoph Molnar with R code available
A Twitter thread, linking to several interpretation tools available for R.
A short (4 hrs) online course by Kaggle, Machine Learning Explainability, and the accompanying blog post
... and a whole bunch of resources in the Awesome Machine Learning Interpetability repo
这篇关于预测分析-“为什么"因子&模型的可解释性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!