API Design. Inspired by the API design of scikit-learn [1]} and PyOD [2]}, all detection algorithms in PyGOD inherit from a base class with the same API interface:
(i) fit trains the detection model, gets the outlier scores (the higher, the more outlying) and labels on the input data, and generates necessary statistics for prediction (in the inductive setting); (ii) decision_function leverages the trained model to predict the raw outlier scores of the incoming data (in the inductive setting);
(iii) predict returns the binary prediction using the trained model (0 for normal samples and 1 for outliers);
and (iv) predict_proba returns the probability of samples being outlier using the leading method [3]}.
Meanwhile, we also include the recent advance in providing the confidence score in outlier detection [4]} for the above prediction methods.
The usage of the above APIs is demonstrated in Code demo .
