如何准确表示用HashingDectorizer制成的列的形状值?

发布于 2025-02-09 07:27:04 字数 124 浏览 2 评论 0原文

我使用了Sklearn的HashingVectorizer()来表示数据集的唯一ID,该数据集将数据放入n列中,我想计算此数据的总SHAP值。是简单地将所有平均形状值添加在一起的正确方法,还是我取值的平均值

I used a HashingVectorizer() from sklearn to represent the unique IDs of a dataset which hashes the data into n columns, and I want to calculate the total SHAP value of this data. Is the correct way to simply add all their mean SHAP values together, or do I take the average of the values

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

年少掌心 2025-02-16 07:27:04

我认为,如果没有重大额外的工作,您将获得最接近的是 <代码> shap.explainers.partition ,它将接受或计算功能的分层聚类。

另外,定义自己的掩蔽器将更有原则性 - 您应该能够为每个输入提供在这里

I think the closest you will get without significant additional work is shap.explainers.Partition, which will either accept or compute a hierarchical clustering of features.

Alternatively, it would be more principled to define your own masker - you should be able to provide a list of them for each input as described here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文