shap.models.Model

class shap.models.Model(model=None)

This is the superclass of all models.

__init__(model=None)

Wrap a callable model as a SHAP Model object.

Methods

__init__([model])

Wrap a callable model as a SHAP Model object.

load(in_file[, instantiate])

This is meant to be overriden by subclasses and called with super.

save(out_file)

Save the model to the given file stream.

classmethod load(in_file, instantiate=True)

This is meant to be overriden by subclasses and called with super.

We return constructor argument values when not being instantiated. Since there are no constructor arguments for the Serializable class we just return an empty dictionary.

save(out_file)

Save the model to the given file stream.