alibi.api.interfaces
Constants
logger
logger
logger: logging.Logger = <Logger alibi.api.interfaces (WARNING)>
Instances of the Logger class represent a single logging channel. A "logging channel" indicates an area of an application. Exactly how an "area" is defined is up to the application developer. Since an application can have any number of areas, logging channels are identified by a unique string. Application areas can be nested (e.g. an area of "input processing" might include sub-areas "read CSV files", "read XLS files" and "read Gnumeric files"). To cater for this natural nesting, channel names are organized into a namespace hierarchy where levels are separated by periods, much like the Java or Python package namespace. So in the instance given above, channel names might be "input" for the upper level, and "input.csv", "input.xls" and "input.gnu" for the sub-levels. There is no arbitrary limit to the depth of nesting.
AlibiPrettyPrinter
AlibiPrettyPrinter
Inherits from: PrettyPrinter
Overrides the built in dictionary pretty representation to look more similar to the external prettyprinter libary.
Constructor
AlibiPrettyPrinter(self, *args, **kwargs)
Base
Base
Base class for all alibi
algorithms. Implements a structured approach to handle metadata.
Constructor
Base(self, meta: dict = NOTHING) -> None
meta
dict
NOTHING
Explainer
Explainer
Inherits from: ABC
, Base
Base class for explainer algorithms from :py:mod:alibi.explainers
.
Methods
explain
explain
explain(X: typing.Any) -> alibi.api.interfaces.Explanation
X
typing.Any
Returns
Type:
alibi.api.interfaces.Explanation
load
load
load(path: Union[str, os.PathLike], predictor: typing.Any) -> alibi.api.interfaces.Explainer
path
Union[str, os.PathLike]
Path to a directory containing the saved explainer.
predictor
typing.Any
Model or prediction function used to originally initialize the explainer.
Returns
Type:
alibi.api.interfaces.Explainer
reset_predictor
reset_predictor
reset_predictor(predictor: typing.Any) -> None
predictor
typing.Any
New predictor.
Returns
Type:
None
save
save
save(path: Union[str, os.PathLike]) -> None
path
Union[str, os.PathLike]
Path to a directory. A new directory will be created if one does not exist.
Returns
Type:
None
Explanation
Explanation
Explanation class returned by explainers.
Constructor
Explanation(self, meta: dict, data: dict) -> None
meta
dict
data
dict
Methods
from_json
from_json
from_json(jsonrepr) -> alibi.api.interfaces.Explanation
jsonrepr
json
representation of an explanation.
Returns
Type:
alibi.api.interfaces.Explanation
to_json
to_json
to_json() -> str
Serialize the explanation data and metadata into a json
format.
Returns
Type:
str
FitMixin
FitMixin
Inherits from: ABC
Methods
fit
fit
fit(X: typing.Any) -> alibi.api.interfaces.Explainer
X
typing.Any
Returns
Type:
alibi.api.interfaces.Explainer
Summariser
Summariser
Inherits from: ABC
, Base
Base class for prototype algorithms from :py:mod:alibi.prototypes
.
Methods
load
load
load(path: Union[str, os.PathLike]) -> alibi.api.interfaces.Summariser
path
Union[str, os.PathLike]
Returns
Type:
alibi.api.interfaces.Summariser
save
save
save(path: Union[str, os.PathLike]) -> None
path
Union[str, os.PathLike]
Returns
Type:
None
summarise
summarise
summarise(num_prototypes: int) -> alibi.api.interfaces.Explanation
num_prototypes
int
Returns
Type:
alibi.api.interfaces.Explanation
Functions
default_meta
default_meta
default_meta() -> dict
Returns
Type:
dict
Last updated
Was this helpful?