如何准确表示用HashingDectorizer制成的列的形状值?
我使用了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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为,如果没有重大额外的工作,您将获得最接近的是 <代码> 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.