shap.maskers.FixedComposite

class shap.maskers.FixedComposite(masker)

A masker that outputs both the masked data and the original data as a pair.

__init__(masker)

Creates a Composite masker from an underlying masker and returns the original args along with the masked output.

Parameters:
masker: object

An object of the shap.maskers.Masker base class (eg. Text/Image masker).

Returns:
tuple

A tuple consisting of the masked input using the underlying masker appended with the original args in a list.

Methods

__init__(masker)

Creates a Composite masker from an underlying masker and returns the original args along with the masked output.

load(in_file[, instantiate])

Load a FixedComposite masker from a file stream.

save(out_file)

Write a FixedComposite masker to a file stream.

classmethod load(in_file, instantiate=True)

Load a FixedComposite masker from a file stream.

save(out_file)

Write a FixedComposite masker to a file stream.