shap.maskers.FixedComposite
- class shap.maskers.FixedComposite(masker)
一个掩码器,它输出掩码数据和原始数据对。
- __init__(masker)
从底层掩码器创建一个 Composite 掩码器,并返回原始参数以及掩码输出。
- 参数:
- masker: object
shap.maskers.Masker 基类的对象 (例如 Text/Image masker)。
- 返回值:
- tuple
一个元组,包含使用底层掩码器掩码的输入,并附加原始参数列表。
方法
__init__
(masker)从底层掩码器创建一个 Composite 掩码器,并返回原始参数以及掩码输出。
load
(in_file[, instantiate])从文件流加载 FixedComposite 掩码器。
save
(out_file)将 FixedComposite 掩码器写入文件流。
- classmethod load(in_file, instantiate=True)
从文件流加载 FixedComposite 掩码器。
- save(out_file)
将 FixedComposite 掩码器写入文件流。