api_cc.rst
1 API CheatSheet 2 ============== 3 4 The full API Reference is split by modality: :doc:`pyod.models.tabular`, :doc:`pyod.models.timeseries`, :doc:`pyod.models.graph`, :doc:`pyod.models.embedding`, :doc:`pyod.ad_engine`, and :doc:`pyod.utils`. Below is a quick cheatsheet for the shared detector API: 5 6 * :func:`pyod.models.base.BaseDetector.fit`: The parameter y is ignored in unsupervised methods. 7 * :func:`pyod.models.base.BaseDetector.decision_function`: Predict raw anomaly scores for X using the fitted detector. 8 * :func:`pyod.models.base.BaseDetector.predict`: Determine whether a sample is an outlier or not as binary labels using the fitted detector. 9 * :func:`pyod.models.base.BaseDetector.predict_proba`: Estimate the probability of a sample being an outlier using the fitted detector. 10 * :func:`pyod.models.base.BaseDetector.predict_confidence`: Assess the model's confidence on a per-sample basis (applicable in predict and predict_proba) :cite:`a-perini2020quantifying`. 11 12 13 **Key Attributes of a fitted model**: 14 15 * :attr:`pyod.models.base.BaseDetector.decision_scores_`: Outlier scores of the training data. Higher scores typically indicate more abnormal behavior. Outliers usually have higher scores. 16 Outliers tend to have higher scores. 17 * :attr:`pyod.models.base.BaseDetector.labels_`: Binary labels of the training data, where 0 indicates inliers and 1 indicates outliers/anomalies. 18 19 20 See base class definition below: 21 22 pyod.models.base module 23 ----------------------- 24 25 .. automodule:: pyod.models.base 26 :members: 27 :undoc-members: 28 :show-inheritance: 29 :inherited-members: 30