Model-Agnostic Methods - Global Surrogate&Local Surrogate (LIME)

全局代理和局部代理

一、Global Surrogate全局代理

具体步骤如下:

Perform the following steps to obtain a surrogate model:

  • 1. Select a dataset X. This can be the same dataset that was used for training the black box model or a new dataset from the same distribution. You could even select a subset of the data or a grid of points, depending on your application.
  • 2. For the selected dataset X, get the predictions of the black box model.
  • 3. Select an interpretable model type (linear model, decision tree, ...).
  • 4. Train the interpretable model on the dataset X and its predictions.
  • 5. Congratulations! You now have a surrogate model.
  • 6. Measure how well the surrogate model replicates the predictions of the black box model.
  • 7. Interpret the surrogate model.

 具体怎么衡量代理模拟黑盒模型的好坏程度,我们可以用R-squared

越大说明代理模拟黑盒模型模拟得越好

二、Local Surrogate (LIME)局部代理

Local surrogate models are interpretable models that are used to explain individual predictions of black box machine learning models.强调是对个体预测结果的可解释性

The recipe for training local surrogate models:

  • Select your instance of interest for which you want to have an explanation of its black box prediction.

  • Perturb your dataset and get the black box predictions for these new points.

  • Weight the new samples according to their proximity to the instance of interest.

  • Train a weighted, interpretable model on the dataset with the variations.

  • Explain the prediction by interpreting the local model.

How do you get the variations of the data? This depends on the type of data, which can be either text, image or tabular data. For text and images, the solution is to turn single words or super-pixels on or off. In the case of tabular data, LIME creates new samples by perturbing each feature individually, drawing from a normal distribution with mean and standard deviation taken from the feature.(怎么变换数据?对于image或text,可以关掉单个像素或word;对于tabular,可以从原feature中提取出mean和std,模拟新样本。)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值