Getting Started
Last updated
Was this helpful?
Last updated
Was this helpful?
Alibi Detect can be installed from or by following the instructions below.
Alibi Detect can be installed from with pip
. We provide optional dependency buckets for several modules that are large or sometimes tricky to install. Many detectors are supported out of the box with the default install but some detectors require a specific optional dependency installation to use. For instance, the OutlierProphet
detector requires the prophet installation. Other detectors have a choice of backend. For instance, the LSDDDrift
detector has a choice of tensorflow
or pytorch
backends. The tabs below list the full set of detector functionality provided by each optional dependency.
Default installation.
The default installation provides out the box support for the following detectors:
To install the conda-forge version it is recommended to use , which can be installed to the baseconda enviroment with:
mamba
can then be used to install alibi-detect in a conda enviroment:
To get a list of respectively the latest outlier, adversarial and drift detection algorithms, you can type:
For detailed information on the outlier detectors:
Similar for adversarial detection:
And data drift:
First, we import the detector:
Then we initialize it by passing it the necessary arguments:
Some detectors require an additional .fit
step using training data:
The predictions are returned in a dictionary with as keys meta
and data
. meta
contains the detector's metadata while data
is in itself a dictionary with the actual predictions (and other relevant values). It has either is_outlier
, is_adversarial
or is_drift
(filled with 0's and 1's) as well as optional instance_score
, feature_score
or p_value
as keys with numpy arrays as values.
Installation with backend.
If you wish to use the GPU version of PyTorch, or are installing on Windows, it is recommended to prior to installing alibi-detect.
Installation with backend.
Installation with backend.
KeOps requires a C++ compiler compatible with std=c++11
, for example g++ >=7
or clang++ >=8
, and a installation. For more detailed version requirements and testing instructions for KeOps, see the . Currently, the KeOps backend is only officially supported on Linux.
Installation with support.
Provides support for the time series outlier detector.
is an open source Python library focused on outlier, adversarial and drift detection. The package aims to cover both online and offline detectors for tabular data, text, images and time series. TensorFlow, PyTorch and (where applicable) backends are supported for drift detection. Alibi-Detect does not install these as default. See for more details.
Summary tables highlighting the practical use cases for all the algorithms can be found .
We will use the to illustrate the usage of outlier and adversarial detectors in alibi-detect.
The detectors can be saved or loaded as described in . Finally, we can make predictions on test data and detect outliers or adversarial examples.
The exact details will vary slightly from method to method, so we encourage the reader to become familiar with the in alibi-detect.