alibi_detect.base
Constants
DEFAULT_META
DEFAULT_METADEFAULT_META: dict = {'name': None, 'online': None, 'data_type': None, 'version': None, 'detector_...LARGE_ARTEFACTS
LARGE_ARTEFACTSLARGE_ARTEFACTS: list = ['x_ref', 'c_ref', 'preprocess_fn']Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
BaseDetector
BaseDetectorInherits from: ABC
Base class for outlier, adversarial and drift detection algorithms.
Constructor
BaseDetector(self)Properties
meta
Dict
Methods
predict
predictpredict(X: numpy.ndarray)X
numpy.ndarray
score
scorescore(X: numpy.ndarray)X
numpy.ndarray
ConfigurableDetector
ConfigurableDetectorInherits from: Detector, Protocol, Generic
Type Protocol for detectors that have support for saving via config.
Used for typing save and load functionality in alibi_detect.saving.saving.
Methods
from_config
from_configfrom_config(config: dict)config
dict
get_config
get_configget_config() -> dictReturns
Type:
dict
Detector
DetectorInherits from: Protocol, Generic
Type Protocol for all detectors.
Used for typing legacy save and load functionality in alibi_detect.saving._tensorflow.saving.py.
Note
This exists to distinguish between detectors with and without support for config saving and loading. Once all
detector support this then this protocol will be removed.Constructor
Detector(self, *args, **kwargs)Methods
predict
predictpredict() -> typing.AnyReturns
Type:
typing.Any
DriftConfigMixin
DriftConfigMixinA mixin class containing methods related to a drift detector's configuration dictionary.
Constructor
DriftConfigMixin(self, /, *args, **kwargs)Methods
from_config
from_configfrom_config(config: dict)Instantiate a drift detector from a fully resolved (and validated) config dictionary.
config
dict
A config dictionary matching the schema's in :class:~alibi_detect.saving.schemas.
get_config
get_configget_config() -> dictGet the detector's configuration dictionary.
Returns
Type:
dict
FitMixin
FitMixinInherits from: ABC
Methods
fit
fitfit(args, kwargs) -> NoneReturns
Type:
None
NumpyEncoder
NumpyEncoderInherits from: JSONEncoder
Methods
default
defaultdefault(obj)obj
StatefulDetectorOnline
StatefulDetectorOnlineInherits from: ConfigurableDetector, Detector, Protocol, Generic
Type Protocol for detectors that have support for save/loading of online state.
Used for typing save and load functionality in alibi_detect.saving.saving.
Methods
load_state
load_stateload_state(filepath: Union[str, os.PathLike])filepath
Union[str, os.PathLike]
save_state
save_statesave_state(filepath: Union[str, os.PathLike])filepath
Union[str, os.PathLike]
ThresholdMixin
ThresholdMixinInherits from: ABC
Methods
infer_threshold
infer_thresholdinfer_threshold(args, kwargs) -> NoneReturns
Type:
None
Functions
adversarial_correction_dict
adversarial_correction_dictadversarial_correction_dict()adversarial_prediction_dict
adversarial_prediction_dictadversarial_prediction_dict()concept_drift_dict
concept_drift_dictconcept_drift_dict()outlier_prediction_dict
outlier_prediction_dictoutlier_prediction_dict()Last updated
Was this helpful?

