
Une bibliothèque Python pour la détection d'anomalies sur des données tabulaires, des séries temporelles, des graphes, du texte, des images et de l'audio. Plus de 60 détecteurs, une orchestration ADEngine adossée à des benchmarks, et un workflow agentique pour les agents IA.
.. image:: https://raw.githubusercontent.com/yzhao062/pyod/master/brand/pyod-icon.svg :target: https://pyod.dev :alt: Écosystème PyOD :width: 84px
PyOD 3 : détection d'anomalies agentique à grande échelle
|badge_website| |badge_pypi| |badge_anaconda| |badge_docs| |badge_stars| |badge_forks| |badge_downloads| |badge_testing| |badge_coverage| |badge_maintainability| |badge_license| |badge_benchmark|
.. |badge_website| image:: https://img.shields.io/badge/website-pyod.dev-990000 :target: https://pyod.dev :alt: Site web
.. |badge_pypi| image:: https://img.shields.io/pypi/v/pyod.svg?color=brightgreen :target: https://pypi.org/project/pyod/ :alt: Version PyPI
.. |badge_anaconda| image:: https://anaconda.org/conda-forge/pyod/badges/version.svg :target: https://anaconda.org/conda-forge/pyod :alt: Version Anaconda
.. |badge_docs| image:: https://readthedocs.org/projects/pyod/badge/?version=latest :target: https://pyod.readthedocs.io/en/latest/?badge=latest :alt: Statut de la documentation
.. |badge_stars| image:: https://img.shields.io/github/stars/yzhao062/pyod.svg :target: https://github.com/yzhao062/pyod/stargazers :alt: Étoiles GitHub
.. |badge_forks| image:: https://img.shields.io/github/forks/yzhao062/pyod.svg?color=blue :target: https://github.com/yzhao062/pyod/network :alt: Forks GitHub
.. |badge_downloads| image:: https://pepy.tech/badge/pyod :target: https://pepy.tech/project/pyod :alt: Téléchargements
.. |badge_testing| image:: https://github.com/yzhao062/pyod/actions/workflows/testing.yml/badge.svg :target: https://github.com/yzhao062/pyod/actions/workflows/testing.yml :alt: Tests
.. |badge_coverage| image:: https://coveralls.io/repos/github/yzhao062/pyod/badge.svg :target: https://coveralls.io/github/yzhao062/pyod :alt: État de couverture
.. |badge_maintainability| image:: https://api.codeclimate.com/v1/badges/bdc3d8d0454274c753c4/maintainability :target: https://codeclimate.com/github/yzhao062/Pyod/maintainability :alt: Maintenabilité
.. |badge_license| image:: https://img.shields.io/github/license/yzhao062/pyod.svg :target: https://github.com/yzhao062/pyod/blob/master/LICENSE :alt: Licence
.. |badge_benchmark| image:: https://img.shields.io/badge/ADBench-benchmark_results-pink :target: https://github.com/Minqi824/ADBench :alt: Benchmark
**PyOD est prêt pour les agents.** Claude Code et Codex peuvent utiliser la compétence ``od-expert`` pour piloter les investigations ADEngine, tandis que les agents compatibles MCP peuvent interroger les outils de connaissances et de planification des détecteurs de PyOD. L'API classique ``fit``/``predict`` reste inchangée.
PyOD 3 est la bibliothèque Python la plus complète pour la détection d'anomalies. Quatre piliers :
=========================== ========================================================================================
Pilier Ce que cela signifie
=========================== ========================================================================================
Multi-modal 61 détecteurs pour les données tabulaires, de séries temporelles, de graphes, de texte, d'image et d'audio, une seule API
Cycle de vie complet Des données brutes aux anomalies expliquées et aux recommandations pour les étapes suivantes en un seul appel
Agentique od-expert transforme les requêtes en langage naturel en workflows ADEngine ; MCP expose des outils structurés pour d'autres agents
Le plus utilisé 46+ millions de téléchargements ; routage appuyé par des benchmarks (ADBench, TSB-AD, BOND, NLP-ADBench)
=========================== ========================================================================================
Installation ^^^^^^^^^^^^
Bibliothèque principale (requise pour chaque chemin d'activation) :
.. code-block:: bash
pip install pyod
Choisissez ensuite le chemin d'activation qui correspond à votre pile d'agents :
.. code-block:: bash
# 1. Claude Code / Codex — enables the od-expert skill
pyod install skill # Claude Code: user-global (~/.claude/skills/)
pyod install skill --project # Codex: project-local (./skills/, Codex has no user-global dir)
# 2. Any MCP-compatible LLM — requires the optional mcp extra
pip install pyod[mcp]
pyod mcp serve # alias for `python -m pyod.mcp_server`
# 3. Pure Python — no extra step
# from pyod.utils.ad_engine import ADEngine
Exécutez pyod info à tout moment pour voir la version, le nombre de détecteurs et l'état d'installation de chaque chemin d'activation. pyod info détecte également la pile d'agents que vous avez installée (~/.claude/ pour Claude Code, ~/.codex/ pour Codex) et recommande la commande d'installation appropriée.
Pour conda, l'installation à partir des sources, les détails des dépendances et le dépannage, consultez le guide d'installation complet <https://pyod.readthedocs.io/en/latest/install.html>__. La commande héritée pyod-install-skill de la v3.0.0 fonctionne toujours comme alias pour pyod install skill.
Détection d'anomalies en 5 lignes de code (pip install pyod) :
.. code-block:: python
from pyod.models.iforest import IForest
clf = IForest()
clf.fit(X_train)
y_train_scores = clf.decision_scores_ # training anomaly scores
y_test_scores = clf.decision_function(X_test) # test anomaly scores
Trois façons d'utiliser PyOD :
========= ======================== ====================================================================================== =======================================
Niveau Nom Quand l'utiliser Point d'entrée
========= ======================== ====================================================================================== =======================================
1 API classique Vous savez quel détecteur vous voulez Exemples du niveau 1 <https://pyod.readthedocs.io/en/latest/examples/tabular.html>__
2 ADEngine Vous voulez que PyOD choisisse, compare et évalue automatiquement Guide du niveau 2 <https://pyod.readthedocs.io/en/latest/examples/adengine.html>__
3 Investigation agentique Vous voulez qu'un agent IA pilote la détection d'anomalies par conversation naturelle Guide du niveau 3 <https://pyod.readthedocs.io/en/latest/examples/agentic.html>__
========= ======================== ====================================================================================== =======================================
Les niveaux 2 et 3 sont propulsés par ADEngine, le cœur d'orchestration du cycle de vie de PyOD. Le flux complet d'investigation multi-tours du niveau 3 est disponible via la compétence od-expert pour Claude Code et Codex. Le serveur MCP (python -m pyod.mcp_server) expose dix outils sans état pour les LLM compatibles MCP, couvrant les requêtes de connaissances (list_detectors, explain_detector, compare_detectors, get_benchmarks), la planification (profile_data, plan_detection, build_detector) et la détection (run_detection, analyze_results, explain_findings) ; les outils MCP avec état / sont reportés.
.. image:: https://raw.githubusercontent.com/yzhao062/pyod/development/docs/figs/agentic-demo.png :alt: Démo d'investigation agentique PyOD 3 sur le jeu de données de cardiotocographie :align: center :width: 720
La figure ci-dessus montre une véritable conversation agentique en 5 tours sur le jeu de données UCI Cardiotocography. Voir le guide complet <https://pyod.readthedocs.io/en/latest/examples/agentic.html>, l'exemple agentique exécutable <https://github.com/yzhao062/pyod/blob/development/examples/agentic_example.py> ou la démo HTML interactive <https://htmlpreview.github.io/?https://github.com/yzhao062/pyod/blob/development/examples/agentic_demo.html>__.
Écosystème et ressources PyOD :
NLP-ADBench <https://github.com/USC-FORTIS/NLP-ADBench>__ (détection d'anomalies NLP) | TODS <https://github.com/datamllab/tods>__ (séries temporelles) | PyGOD <https://pygod.org/>__ (graphes) | ADBench <https://github.com/Minqi824/ADBench>__ (benchmark) | AD-LLM <https://arxiv.org/abs/2412.11142>__ (AD basée sur LLM) [#Yang2024ad]_ | Ressources <https://github.com/yzhao062/anomaly-detection-resources>__
À propos de PyOD ^^^^^^^^^^^^^^^^
PyOD, créé en 2017, est la bibliothèque Python de détection d'anomalies la plus ancienne et la plus utilisée. Avec 46+ millions de téléchargements <https://pepy.tech/project/pyod>, il sert à la fois la recherche académique (présentée dans Analytics Vidhya <https://www.analyticsvidhya.com/blog/2019/02/outlier-detection-python-pyod/>, KDnuggets <https://www.kdnuggets.com/2019/02/outlier-detection-methods-cheat-sheet.html>__ et Towards Data Science <https://towardsdatascience.com/anomaly-detection-for-dummies-15f148e559c1>__) et les produits commerciaux.
V3 étend la bibliothèque avec ADEngine (orchestration du cycle de vie) et la compétence od-expert (workflow agentique), tout en maintenant l'API classique fit/predict entièrement rétrocompatible. V3 est construite sur SUOD [#Zhao2021SUOD]_ pour un entraînement parallèle rapide et sur numba JIT pour des accélérations par modèle.
Impact et reconnaissance :
=================================== ===========================================================================
Domaine Exemples
=================================== ===========================================================================
Espace et science Le benchmark de télémétrie du vaisseau spatial OPS-SAT <https://www.nature.com/articles/s41597-025-05035-3>__ de l'Agence spatiale européenne (Nature Scientific Data, 2025) utilise PyOD pour les 30 algorithmes.
Déploiement en entreprise Walmart (1M+ de mises à jour de prix quotidiennes, KDD 2019), Databricks (framework Kakapo intégrant PyOD à MLflow/Hyperopt ; solution de détection de menaces internes), IQVIA (123K+ de demandes de remboursement en pharmacie), Altair AI Studio, Ericsson (brevet WO2023166515A1 <https://patents.google.com/patent/WO2023166515A1>).
Livres Outlier Detection in Python <https://www.manning.com/books/outlier-detection-in-python> (Brett Kennedy, Manning) ; Handbook of Anomaly Detection with Python (Chris Kuo, Columbia) ; Finding Ghosts in Your Data <https://link.springer.com/book/10.1007/978-1-4842-8870-2>__ (Kevin Feasel, Apress).
Cours DataCamp Anomaly Detection in Python <https://www.datacamp.com/courses/anomaly-detection-in-python>__ (19M+ d'apprenants sur la plateforme), Manning liveProject <https://www.manning.com/liveproject/using-pyod-and-ensembles-methods>, ), japonais, coréen, allemand, espagnol.
=================================== ===========================================================================
Consultez la page d'impact complète <https://pyod.readthedocs.io/en/latest/impact.html>__ sur Read the Docs pour la liste complète des citations, des déploiements en entreprise, des brevets et de la couverture médiatique.
Citation de PyOD :
Si vous utilisez PyOD dans une publication scientifique, nous vous saurions gré de citer le ou les articles suivants :
PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection <https://arxiv.org/abs/2412.12154>__ est disponible en prépublication. Si vous utilisez PyOD dans une publication scientifique, nous vous saurions gré de citer l'article suivant ::
@inproceedings{chen2025pyod,
title={Pyod 2: A python library for outlier detection with llm-powered model selection},
author={Chen, Sihan and Qian, Zhuangzhuang and Siu, Wingchun and Hu, Xingcan and Li, Jiaqi and Li, Shawn and Qin, Yuehan and Yang, Tiankai and Xiao, Zhuo and Ye, Wanghao and others},
booktitle={Companion Proceedings of the ACM on Web Conference 2025},
pages={2807--2810},
year={2025}
}
PyOD paper <http://www.jmlr.org/papers/volume20/19-011/19-011.pdf>__ est publié dans le Journal of Machine Learning Research (JMLR) <http://www.jmlr.org/>__ (volet MLOSS).::
@article{zhao2019pyod,
author = {Zhao, Yue and Nasrullah, Zain and Li, Zheng},
title = {PyOD: A Python Toolbox for Scalable Outlier Detection},
journal = {Journal of Machine Learning Research},
year = {2019},
volume = {20},
number = {96},
pages = {1-7},
url = {http://jmlr.org/papers/v20/19-011.html}
}
ou ::
Zhao, Y., Nasrullah, Z. and Li, Z., 2019. PyOD: A Python Toolbox for Scalable Outlier Detection. Journal of machine learning research (JMLR), 20(96), pp.1-7.
Pour une perspective plus large sur la détection d'anomalies, consultez nos articles NeurIPS sur ADBench <https://arxiv.org/abs/2206.09426>__ [#Han2022ADBench]_ et ADGym <https://arxiv.org/abs/2309.15376>__.
Table des matières :
Aide-mémoire et référence de l'API <#api-cheatsheet--reference>__Benchmarks <#benchmarks>__Algorithmes implémentés <#implemented-algorithms>__ (Tabulaire, Séries temporelles, Graphes, Embedding)Sujets supplémentaires <#additional-topics>__ (Enregistrement/chargement de modèles, SUOD, Seuillage)Démarrage rapide pour la détection d'anomalies <#quick-start-for-outlier-detection>__Comment contribuer <#how-to-contribute>__Critères d'inclusion <#inclusion-criteria>__Aide-mémoire et référence de l'API ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
La référence complète de l'API est répartie par modalité dans la documentation PyOD <https://pyod.readthedocs.io/en/latest/>__ : Tabular <https://pyod.readthedocs.io/en/latest/pyod.models.tabular.html>, Time Series <https://pyod.readthedocs.io/en/latest/pyod.models.timeseries.html>, Graph <https://pyod.readthedocs.io/en/latest/pyod.models.graph.html>, Embedding <https://pyod.readthedocs.io/en/latest/pyod.models.embedding.html>, ADEngine <https://pyod.readthedocs.io/en/latest/pyod.ad_engine.html>, Utilities <https://pyod.readthedocs.io/en/latest/pyod.utils.html>. Voici un aide-mémoire rapide pour tous les détecteurs :
Attributs clés d'un modèle ajusté :
Benchmarks ^^^^^^^^^^
ADBench <https://github.com/Minqi824/ADBench>__ [#Han2022ADBench]_ : 30 algorithmes sur 57 jeux de données tabulaires. Voir la comparaison <https://github.com/yzhao062/pyod/blob/master/examples/compare_all_models.py>__.NLP-ADBench <https://github.com/USC-FORTIS/NLP-ADBench>__ : 19 méthodes sur 8 jeux de données texte. L'approche en deux étapes (embedding + détecteur) surpasse l'approche de bout en bout.TSB-AD <https://github.com/TheDatumOrg/TSB-AD>__ [#Liu2024TSB]_ : 40 algorithmes sur 1070 jeux de données de séries temporelles (NeurIPS 2024).BOND <https://arxiv.org/abs/2206.10071>__ [#Liu2022BOND]_ : 14 algorithmes de détection d'anomalies sur graphes sur 14 jeux de données (NeurIPS 2022).Sujets supplémentaires ^^^^^^^^^^^^^^^^^^^^^^
Enregistrement et chargement de modèles <https://pyod.readthedocs.io/en/latest/model_persistence.html>__ : Utilisez joblib ou pickle pour enregistrer et charger les modèles PyOD. Voir l'exemple <https://github.com/yzhao062/pyod/blob/master/examples/save_load_model_example.py>__.Entraînement rapide avec SUOD <https://pyod.readthedocs.io/en/latest/fast_train.html>__ : Accélérez l'entraînement et la prédiction avec le framework SUOD [#Zhao2021SUOD]_. Voir l'exemple <https://github.com/yzhao062/pyod/blob/master/examples/suod_example.py>__.Seuillage des scores d'anomalie <https://pyod.readthedocs.io/en/latest/thresholding.html>__ : Approches guidées par les données pour définir les niveaux de contamination via PyThresh <https://github.com/KulikDM/pythresh>__.Algorithmes implémentés ^^^^^^^^^^^^^^^^^^^^^^^
PyOD est organisé en deux groupes fonctionnels : (i) les algorithmes de détection, avec des sous-sections dédiées aux données tabulaires, de séries temporelles, de graphes et audio (EmbeddingOD dans le tableau tabulaire ajoute la prise en charge du texte et des images via les encodeurs de modèles de fondation) ; et (ii) les fonctions utilitaires pour la génération de données, l'évaluation et l'orchestration du cycle de vie.
(i-a) Algorithmes de détection tabulaires et multi-modaux :
.. list-table::
:widths: 15 14 58 5 8
:header-rows: 1* - Probabiliste
- ECOD
- Détection non supervisée d'anomalies à l'aide de fonctions de distribution cumulatives empiriques (exemple <https://github.com/yzhao062/pyod/blob/development/examples/ecod_example.py>__)
- 2022
- [#Li2021ECOD]_
exemple <https://github.com/yzhao062/pyod/blob/development/examples/abod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/abod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/copod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/mad_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/sos_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/qmcd_example.py>__)Les méthodes d'ensemble (IForest, INNE, DIF, FB, LSCP, LODA, SUOD, XGBOD) sont incluses dans le tableau ci-dessus. Les fonctions de combinaison de scores (moyenne, maximisation, AOM, MOA, médiane, vote majoritaire) se trouvent dans pyod.models.combination. Voir la documentation de l'API <https://pyod.readthedocs.io/en/latest/pyod.models.tabular.html>__ pour plus de détails.
(i-b) Détection d'anomalies dans les séries temporelles :
Tous les détecteurs de séries temporelles utilisent la même API fit/predict/decision_function que les détecteurs tabulaires, à une exception près : MatrixProfile est transductif (entraînement uniquement ; utilisez decision_scores_ et labels_ après fit(), pas de predict hors échantillon).
Format d'entrée : tableau numpy de forme (n_timestamps,) pour univarié ou (n_timestamps, n_channels) pour multivarié. Chaque ligne est un pas de temps ; les colonnes sont les canaux/caractéristiques. Les DataFrames Pandas et les listes sont convertis automatiquement. Sortie : decision_scores_ de forme (n_timestamps,) avec un score d'anomalie par pas de temps.
Détection de séries temporelles en 3 lignes :
.. code-block:: python
from pyod.models.ts_kshape import KShape # or any TS detector
clf = KShape(window_size=20)
clf.fit(X_train) # shape (n_timestamps,) or (n_timestamps, n_channels)
scores = clf.decision_scores_ # per-timestamp anomaly scores
Classements d'algorithmes du benchmark TSB-AD <https://github.com/TheDatumOrg/TSB-AD>__ [#Liu2024TSB]_ (NeurIPS 2024, 1070 jeux de données) :
.. list-table:: :widths: 15 18 50 5 12 :header-rows: 1
exemple <https://github.com/yzhao062/pyod/blob/development/examples/ts_od_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ts_matrix_profile_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ts_spectral_residual_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ts_kshape_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ts_sand_example.py>__)(i-c) Détection d'anomalies dans les graphes (pip install pyod[graph]) :
Tous les détecteurs de graphes sont transductifs en v1 : utilisez decision_scores_ et labels_ après fit(). Pas de predict hors échantillon. Entrée : objet Data PyG avec x (caractéristiques des nœuds) et edge_index (arêtes COO). SCAN fonctionne sans caractéristiques.
Détection de graphes en 3 lignes (pip install pyod[graph]) :
.. code-block:: python
from pyod.models.pyg_dominant import DOMINANT
clf = DOMINANT(hidden_dim=64, epochs=100)
clf.fit(data) # PyG Data object
scores = clf.decision_scores_ # per-node anomaly scores
Classements d'algorithmes du benchmark BOND <https://arxiv.org/abs/2206.10071>__ [#Liu2022BOND]_ (NeurIPS 2022, 14 jeux de données) :
.. list-table:: :widths: 18 18 45 5 14 :header-rows: 1
exemple dominant <https://github.com/yzhao062/pyod/blob/development/examples/pyg_dominant_example.py>__)exemple cola <https://github.com/yzhao062/pyod/blob/development/examples/pyg_cola_example.py>__)exemple conad <https://github.com/yzhao062/pyod/blob/development/examples/pyg_conad_example.py>__)exemple anomalydae <https://github.com/yzhao062/pyod/blob/development/examples/pyg_anomalydae_example.py>__)exemple guide <https://github.com/yzhao062/pyod/blob/development/examples/pyg_guide_example.py>__)(i-d) Détection d'anomalies audio (pip install pyod[audio]) :
Les clips audio utilisent la même API fit/decision_function. Deux voies sont disponibles : une voie légère « plongement puis détection » (EmbeddingOD.for_audio() transforme chaque clip en un vecteur acoustique de 74 dimensions composé de caractéristiques conçues manuellement et exécute n'importe quel détecteur classique), et un détecteur profond dédié (AudioAE, un autoencodeur de reconstruction log-mel). Les entrées sont des chemins de fichiers, des tableaux de formes d'onde ou des tuples (waveform, sample_rate). Sortie : un score d'anomalie par clip.
Détection audio en 3 lignes (pip install pyod[audio]) :
.. code-block:: python
from pyod.models.embedding import EmbeddingOD
clf = EmbeddingOD.for_audio('balanced') # 74-dim handcrafted features + KNN
clf.fit(train_clips) # list of file paths or waveform arrays
scores = clf.decision_scores_ # per-clip anomaly scores
.. list-table:: :widths: 18 18 45 5 14 :header-rows: 1
for_audio() : caractéristiques MFCC, chroma et spectrales en 74 dimensions avec n'importe quel détecteur(ii) Fonctions utilitaires :=================== ============================ ===================================================================================================================================================== Type Nom Fonction =================== ============================ ===================================================================================================================================================== Données generate_data Génération de données synthétisées ; données normales issues d'une gaussienne multivariée, valeurs aberrantes issues d'une distribution uniforme Données generate_data_clusters Génération de données synthétisées en clusters pour des motifs plus complexes Évaluation evaluate_print Afficher la ROC-AUC et la précision au rang n pour un détecteur Évaluation precision_n_scores Calculer la précision au rang n Utilitaire get_label_n Transformer les scores de valeurs aberrantes bruts en étiquettes binaires en attribuant 1 aux n scores les plus élevés Statistique wpearsonr Calculer la corrélation de Pearson pondérée de deux échantillons Encodage resolve_encoder Déterminer un encodeur à partir d'un nom de chaîne, d'une instance BaseEncoder ou d'un objet appelable Encodage SentenceTransformerEncoder Encoder le texte via les modèles sentence-transformers (p. ex., MiniLM, mpnet) Encodage OpenAIEncoder Encoder le texte via l'API OpenAI Embeddings (text-embedding-3-small/large) Encodage HuggingFaceEncoder Encoder le texte ou les images via les transformers HuggingFace (BERT, DINOv2, CLIP) =================== ============================ =====================================================================================================================================================
Démarrage rapide pour la détection de valeurs aberrantes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PyOD est largement reconnu par la communauté du machine learning grâce à plusieurs articles et tutoriels mis en avant.
Analytics Vidhya : Un excellent tutoriel pour apprendre la détection de valeurs aberrantes en Python avec la bibliothèque PyOD <https://www.analyticsvidhya.com/blog/2019/02/outlier-detection-python-pyod/>__
KDnuggets : Visualisation intuitive des méthodes de détection de valeurs aberrantes <https://www.kdnuggets.com/2019/02/outlier-detection-methods-cheat-sheet.html>, Un aperçu des méthodes de détection de valeurs aberrantes de PyOD <https://www.kdnuggets.com/2019/06/overview-outlier-detection-methods-pyod.html>
Towards Data Science : Détection d'anomalies pour les nuls <https://towardsdatascience.com/anomaly-detection-for-dummies-15f148e559c1>__
"examples/knn_example.py" <https://github.com/yzhao062/pyod/blob/master/examples/knn_example.py>__
illustre l'API de base du détecteur kNN. Il est à noter que l'API de tous les autres algorithmes est cohérente/similaire.
Des instructions plus détaillées pour exécuter les exemples se trouvent dans le répertoire examples <https://github.com/yzhao062/pyod/blob/master/examples>__.
#. Initialisez un détecteur kNN, ajustez le modèle et effectuez la prédiction.
.. code-block:: python
from pyod.models.knn import KNN # détecteur kNN
from pyod.utils.data import generate_data
contamination = 0.1 # pourcentage de valeurs aberrantes
n_train = 200 # nombre de points d'entraînement
n_test = 100 # nombre de points de test
# générer des données d'exemple
X_train, X_test, y_train, y_test = generate_data(
n_train=n_train, n_test=n_test, n_features=2,
contamination=contamination, random_state=42)
# entraîner le détecteur kNN
clf_name = 'KNN'
clf = KNN()
clf.fit(X_train)
# obtenir l'étiquette de prédiction et les scores de valeurs aberrantes des données d'entraînement
y_train_pred = clf.labels_ # étiquettes binaires (0 : normales, 1 : aberrantes)
y_train_scores = clf.decision_scores_ # scores bruts de valeurs aberrantes
# obtenir la prédiction sur les données de test
y_test_pred = clf.predict(X_test) # étiquettes de valeurs aberrantes (0 ou 1)
y_test_scores = clf.decision_function(X_test) # scores de valeurs aberrantes
# il est également possible d'obtenir la confiance de la prédiction
y_test_pred, y_test_pred_confidence = clf.predict(X_test, return_confidence=True) # étiquettes de valeurs aberrantes (0 ou 1) et confiance dans l'intervalle [0,1]
#. Évaluez la prédiction à l'aide de la courbe ROC et de la précision au rang n (p@n).
.. code-block:: python
from pyod.utils.data import evaluate_print
# évaluer et afficher les résultats
print("\nOn Training Data:")
evaluate_print(clf_name, y_train, y_train_scores)
print("\nOn Test Data:")
evaluate_print(clf_name, y_test, y_test_scores)
#. Consultez un exemple de sortie et de visualisation.
.. code-block:: python
On Training Data:
KNN ROC:0.9992, precision @ rank n:0.95
On Test Data:
KNN ROC:1.0, precision @ rank n:1.0
.. code-block:: python
from pyod.utils.example import visualize
visualize(clf_name, X_train, y_train, X_test, y_test, y_train_pred,
y_test_pred, show_figure=True, save_figure=False)
Remerciements ^^^^^^^^^^^^^
Ce document s'appuie sur des travaux soutenus par la National Science Foundation
dans le cadre de la subvention n° 2346158 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2346158>_
pour « NSF POSE : Phase II : OpenAD : An Integrated Open-Source Ecosystem for
Anomaly Detection ». La subvention désigne l'Université de l'Illinois à Chicago comme
organisation principale et l'Illinois Institute of Technology, l'Université Lehigh et
l'Université de Californie du Sud comme organisations sous-bénéficiaires.
Les opinions, résultats, conclusions ou recommandations exprimés dans ce document sont ceux des auteurs et ne reflètent pas nécessairement les points de vue de la National Science Foundation.
Références ^^^^^^^^^^
.. [#Aggarwal2015Outlier] Aggarwal, C.C., 2015. Outlier analysis. In Data mining (pp. 237-263). Springer, Cham.
.. [#Aggarwal2015Theoretical] Aggarwal, C.C. and Sathe, S., 2015. Theoretical foundations and algorithms for outlier ensembles.\ ACM SIGKDD Explorations Newsletter\ , 17(1), pp.24-47.
.. [#Aggarwal2017Outlier] Aggarwal, C.C. and Sathe, S., 2017. Outlier ensembles: An introduction. Springer.
.. [#Almardeny2020A] Almardeny, Y., Boujnah, N. and Cleary, F., 2020. A Novel Outlier Detection Method for Multivariate Data. IEEE Transactions on Knowledge and Data Engineering.
.. [#Angiulli2002Fast] Angiulli, F. and Pizzuti, C., 2002, August. Fast outlier detection in high dimensional spaces. In European Conference on Principles of Data Mining and Knowledge Discovery pp. 15-27.
.. [#Arning1996A] Arning, A., Agrawal, R. and Raghavan, P., 1996, August. A Linear Method for Deviation Detection in Large Databases. In KDD (Vol. 1141, No. 50, pp. 972-981).
.. [#Bandaragoda2018Isolation] Bandaragoda, T. R., Ting, K. M., Albrecht, D., Liu, F. T., Zhu, Y., and Wells, J. R., 2018, Isolation-based anomaly detection using nearest-neighbor ensembles. Computational Intelligence\ , 34(4), pp. 968-998.
.. [#Breunig2000LOF] Breunig, M.M., Kriegel, H.P., Ng, R.T. and Sander, J., 2000, May. LOF: identifying density-based local outliers. ACM Sigmod Record\ , 29(2), pp. 93-104.
.. [#Burgess2018Understanding] Burgess, Christopher P., et al. "Understanding disentangling in beta-VAE." arXiv preprint arXiv:1804.03599 (2018).
.. [#Campello2013Density] Campello, R.J.G.B., Moulavi, D. and Sander, J., 2013, April. Density-based clustering based on hierarchical density estimates. In Pacific-Asia Conference on Knowledge Discovery and Data Mining (pp. 160-172). Springer.
.. [#Cook1977Detection] Cook, R.D., 1977. Detection of influential observation in linear regression. Technometrics, 19(1), pp.15-18.
.. [#Chen2024PyOD] Chen, S., Qian, Z., Siu, W., Hu, X., Li, J., Li, S., Qin, Y., Yang, T., Xiao, Z., Ye, W. and Zhang, Y., 2024. PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection. arXiv preprint arXiv:2412.12154.
.. [#Fang2001Wrap] Fang, K.T. and Ma, C.X., 2001. Wrap-around L2-discrepancy of random sampling, Latin hypercube and uniform designs. Journal of complexity, 17(4), pp.608-624.
.. [#Goldstein2012Histogram] Goldstein, M. and Dengel, A., 2012. Histogram-based outlier score (hbos): A fast unsupervised anomaly detection algorithm. In KI-2012: Poster and Demo Track\ , pp.59-63.
.. [#Goodge2022Lunar] Goodge, A., Hooi, B., Ng, S.K. and Ng, W.S., 2022, June. Lunar: Unifying local outlier detection methods via graph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence.
.. [#Gopalan2019PIDForest] Gopalan, P., Sharan, V. and Wieder, U., 2019. PIDForest: Anomaly Detection via Partial Identification. In Advances in Neural Information Processing Systems, pp. 15783-15793.
.. [#Han2022ADBench] Han, S., Hu, X., Huang, H., Jiang, M. and Zhao, Y., 2022. ADBench: Anomaly Detection Benchmark. arXiv preprint arXiv:2206.09426.
.. [#Hardin2004Outlier] Hardin, J. and Rocke, D.M., 2004. Outlier detection in the multiple cluster setting using the minimum covariance determinant estimator. Computational Statistics & Data Analysis\ , 44(4), pp.625-638.
.. [#He2003Discovering] He, Z., Xu, X. and Deng, S., 2003. Discovering cluster-based local outliers. Pattern Recognition Letters\ , 24(9-10), pp.1641-1650.
.. [#Hoffmann2007Kernel] Hoffmann, H., 2007. Kernel PCA for novelty detection. Pattern recognition, 40(3), pp.863-874.
.. [#Iglewicz1993How] Iglewicz, B. and Hoaglin, D.C., 1993. How to detect and handle outliers (Vol. 16). Asq Press.
.. [#Janssens2012Stochastic] Janssens, J.H.M., Huszár, F., Postma, E.O. and van den Herik, H.J., 2012. Stochastic outlier selection. Technical report TiCC TR 2012-001, Tilburg University, Tilburg Center for Cognition and Communication, Tilburg, The Netherlands.
.. [#Kingma2013Auto] Kingma, D.P. and Welling, M., 2013. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114.
.. [#Kriegel2008Angle] Kriegel, H.P. and Zimek, A., 2008, August. Angle-based outlier detection in high-dimensional data. In KDD '08\ , pp. 444-452. ACM.
.. [#Kriegel2009Outlier] Kriegel, H.P., Kröger, P., Schubert, E. and Zimek, A., 2009, April. Outlier detection in axis-parallel subspaces of high dimensional data. In Pacific-Asia Conference on Knowledge Discovery and Data Mining\ , pp. 831-838. Springer, Berlin, Heidelberg.
.. [#Latecki2007Outlier] Latecki, L.J., Lazarevic, A. and Pokrajac, D., 2007, July. Outlier detection with kernel density functions. In International Workshop on Machine Learning and Data Mining in Pattern Recognition (pp. 61-75). Springer, Berlin, Heidelberg.
.. [#Lazarevic2005Feature] Lazarevic, A. and Kumar, V., 2005, August. Feature bagging for outlier detection. In KDD '05. 2005.
.. [#Li2024NLPADBench] Li, Y., Li, J., Xiao, Z., Yang, T., Nian, Y., Hu, X. and Zhao, Y., 2025. NLP-ADBench: NLP Anomaly Detection Benchmark. In Findings of the Association for Computational Linguistics: EMNLP 2025.
.. [#Li2019MADGAN] Li, D., Chen, D., Jin, B., Shi, L., Goh, J. and Ng, S.K., 2019, September. MAD-GAN: Multivariate anomaly detection for time series data with generative adversarial networks. In International Conference on Artificial Neural Networks (pp. 703-716). Springer, Cham.
.. [#Li2020COPOD] Li, Z., Zhao, Y., Botta, N., Ionescu, C. and Hu, X. COPOD: Copula-Based Outlier Detection. IEEE International Conference on Data Mining (ICDM), 2020.
.. [#Li2021ECOD] Li, Z., Zhao, Y., Hu, X., Botta, N., Ionescu, C. and Chen, H. G. ECOD: Unsupervised Outlier Detection Using Empirical Cumulative Distribution Functions. IEEE Transactions on Knowledge and Data Engineering (TKDE), 2022.
.. [#Liu2008Isolation] Liu, F.T., Ting, K.M. and Zhou, Z.H., 2008, December. Isolation forest. In International Conference on Data Mining\ , pp. 413-422. IEEE.
.. [#Liu2019Generative] Liu, Y., Li, Z., Zhou, C., Jiang, Y., Sun, J., Wang, M. and He, X., 2019. Generative adversarial active learning for unsupervised outlier detection. IEEE Transactions on Knowledge and Data Engineering.
.. [#Nguyen2019scalable] Nguyen, M.N. and Vien, N.A., 2019. Scalable and interpretable one-class svms with deep learning and random fourier features. In Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD, 2018.
.. [#Pang2019Deep] Pang, Guansong, Chunhua Shen, and Anton Van Den Hengel. "Deep anomaly detection with deviation networks." In KDD, pp. 353-362. 2019.
.. [#Papadimitriou2003LOCI] Papadimitriou, S., Kitagawa, H., Gibbons, P.B. and Faloutsos, C., 2003, March. LOCI: Fast outlier detection using the local correlation integral. In ICDE '03, pp. 315-326. IEEE.
.. [#Pevny2016Loda] Pevný, T., 2016. Loda: Lightweight on-line detector of anomalies. Machine Learning, 102(2), pp.275-304.
.. [#Perini2020Quantifying] Perini, L., Vercruyssen, V., Davis, J. Quantifying the confidence of anomaly detectors in their example-wise predictions. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (ECML-PKDD), 2020.
.. [#Perini2023Rejection] Perini, L., Davis, J. Unsupervised anomaly detection with rejection. In Proceedings of the Thirty-Seven Conference on Neural Information Processing Systems (NeurIPS), 2023.
.. [#Ramaswamy2000Efficient] Ramaswamy, S., Rastogi, R. and Shim, K., 2000, May. Efficient algorithms for mining outliers from large data sets. ACM Sigmod Record\ , 29(2), pp. 427-438.
.. [#Rousseeuw1999A] Rousseeuw, P.J. and Driessen, K.V., 1999. A fast algorithm for the minimum covariance determinant estimator. Technometrics\ , 41(3), pp.212-223.
.. [#Ruff2018Deep] Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S.A., Binder, A., Müller, E. and Kloft, M., 2018, July. Deep one-class classification. In International conference on machine learning (pp. 4393-4402). PMLR.
.. [#Schlegl2017Unsupervised] Schlegl, T., Seeböck, P., Waldstein, S.M., Schmidt-Erfurth, U. and Langs, G., 2017, June. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In International conference on information processing in medical imaging (pp. 146-157). Springer, Cham.
.. [#Scholkopf2001Estimating] Scholkopf, B., Platt, J.C., Shawe-Taylor, J., Smola, A.J. and Williamson, R.C., 2001. Estimating the support of a high-dimensional distribution. Neural Computation, 13(7), pp.1443-1471.
.. [#Shyu2003A] Shyu, M.L., Chen, S.C., Sarinnapakorn, K. and Chang, L., 2003. A novel anomaly detection scheme based on principal component classifier. MIAMI UNIV CORAL GABLES FL DEPT OF ELECTRICAL AND COMPUTER ENGINEERING.
.. [#Sugiyama2013Rapid] Sugiyama, M. and Borgwardt, K., 2013. Rapid distance-based outlier detection via sampling. Advances in neural information processing systems, 26.
.. [#Tang2002Enhancing] Tang, J., Chen, Z., Fu, A.W.C. and Cheung, D.W., 2002, May. Enhancing effectiveness of outlier detections for low density patterns. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pp. 535-548. Springer, Berlin, Heidelberg.
.. [#Wang2020adVAE] Wang, X., Du, Y., Lin, S., Cui, P., Shen, Y. and Yang, Y., 2019. adVAE: A self-adversarial variational autoencoder with Gaussian anomaly prior knowledge for anomaly detection. Knowledge-Based Systems.
.. [#Xu2023Deep] Xu, H., Pang, G., Wang, Y., Wang, Y., 2023. Deep isolation forest for anomaly detection. IEEE Transactions on Knowledge and Data Engineering.
.. [#Yang2024ad] Yang, T., Nian, Y., Li, S., Xu, R., Li, Y., Li, J., Xiao, Z., Hu, X., Rossi, R., Ding, K. and Hu, X., 2024. AD-LLM: Benchmarking Large Language Models for Anomaly Detection. arXiv preprint arXiv:2412.11142.
.. [#You2017Provable] You, C., Robinson, D.P. and Vidal, R., 2017. Provable self-representation based outlier detection in a union of subspaces. In Proceedings of the IEEE conference on computer vision and pattern recognition.
.. [#Zenati2018Adversarially] Zenati, H., Romain, M., Foo, C.S., Lecouat, B. and Chandrasekhar, V., 2018, November. Adversarially learned anomaly detection. In 2018 IEEE International conference on data mining (ICDM) (pp. 727-736). IEEE.
.. [#Zhao2018XGBOD] Zhao, Y. and Hryniewicki, M.K. XGBOD: Improving Supervised Outlier Detection with Unsupervised Representation Learning. IEEE International Joint Conference on Neural Networks\ , 2018.
.. [#Zhao2019LSCP] Zhao, Y., Nasrullah, Z., Hryniewicki, M.K. and Li, Z., 2019, May. LSCP: Locally selective combination in parallel outlier ensembles. In Proceedings of the 2019 SIAM International Conference on Data Mining (SDM), pp. 585-593. Society for Industrial and Applied Mathematics.
.. [#Zhao2021SUOD] Zhao, Y., Hu, X., Cheng, C., Wang, C., Wan, C., Wang, W., Yang, J., Bai, H., Li, Z., Xiao, C., Wang, Y., Qiao, Z., Sun, J. and Akoglu, L. (2021). SUOD: Accelerating Large-scale Unsupervised Heterogeneous Outlier Detection. Conference on Machine Learning and Systems (MLSys).
.. [#Boniol2021SAND] Boniol, P., Paparrizos, J., Palpanas, T. and Franklin, M.J., 2021. SAND: Streaming Subsequence Anomaly Detection. Proceedings of the VLDB Endowment, 14(10), pp.1717-1729.
.. [#Malhotra2015Long] Malhotra, P., Vig, L., Shroff, G. and Agarwal, P., 2015. Long Short Term Memory Networks for Anomaly Detection in Time Series. In European Symposium on Artificial Neural Networks (ESANN).
.. [#Paparrizos2015KShape] Paparrizos, J. and Gravano, L., 2015. k-Shape: Efficient and Accurate Clustering of Time Series. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pp.1855-1870.
.. [#Ren2019Time] Ren, H., Xu, B., Wang, Y., Yi, C., Huang, C., Kou, X., Xing, T., Yang, M., Tong, J. and Zhang, Q., 2019. Time-Series Anomaly Detection Service at Microsoft. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp.3009-3017.
.. [#Xu2022Anomaly] Xu, J., Wu, H., Wang, J. and Long, M., 2022. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. In International Conference on Learning Representations (ICLR).
.. [#Yeh2016Matrix] Yeh, C.C.M., Zhu, Y., Ulanova, L., Begum, N., Ding, Y., Dau, H.A., Silva, D.F., Mueen, A. and Keogh, E., 2016. Matrix Profile I: All Pairs Similarity Joins for Time Series Subsequences. In 2016 IEEE 16th International Conference on Data Mining (ICDM), pp.1317-1322.
.. [#Ding2019DOMINANT] Ding, K., Li, J., Bhanushali, R. and Liu, H., 2019. Deep Anomaly Detection on Attributed Networks. In Proceedings of the 2019 SIAM International Conference on Data Mining, pp.594-602. SIAM.
.. [#Liu2022CoLA] Liu, Y., Li, Z., Pan, S., Gool, T., Xiang, T. and Gong, B., 2022. Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning. In Proceedings of the ACM Web Conference 2022, pp.2137-2147.
.. [#Xu2022CONAD] Xu, Z., Huang, X., Zhao, Y., Dong, Y. and Li, J., 2022. Contrastive Attributed Network Anomaly Detection with Data Augmentation. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pp.444-457. Springer.
.. [#Fan2020AnomalyDAE] Fan, H., Zhang, F. and Li, Z., 2020. AnomalyDAE: Dual Autoencoder for Anomaly Detection on Attributed Networks. In Proceedings of the 29th ACM International Conference on Information and Knowledge Management, pp.747-756.
.. [#Yuan2021GUIDE] Yuan, X., Zhou, N., Yu, S., Huang, H., Chen, Z. and Xia, F., 2021. Higher-Order Structure Based Anomaly Detection on Attributed Networks. In 2021 IEEE International Conference on Big Data, pp.2691-2700. IEEE... [#Li2017Radar] Li, J., Dani, H., Hu, X. et Liu, H., 2017. Radar : analyse des résidus pour la détection d'anomalies dans les réseaux attribués. Dans Actes de la vingt-sixième conférence internationale conjointe sur l'intelligence artificielle, pp.2152-2158.
.. [#Peng2018ANOMALOUS] Peng, Z., Luo, M., Li, J., Liu, H. et Zheng, Q., 2018. ANOMALOUS : une approche de modélisation conjointe pour la détection d'anomalies sur les réseaux attribués. Dans Actes de la vingt-septième conférence internationale conjointe sur l'intelligence artificielle, pp.3529-3535.
.. [#Xu2007SCAN] Xu, X., Yuruk, N., Feng, Z. et Schweiger, T.A.J., 2007. SCAN : un algorithme de clustering structurel pour les réseaux. Dans Actes de la 13e conférence internationale ACM SIGKDD sur la découverte de connaissances et la fouille de données, pp.824-833.
.. [#Liu2024TSB] Liu, Q., Boniol, P., Palpanas, T. et Paparrizos, J., 2024. TSB-AD : vers un benchmark fiable de détection d'anomalies dans les séries temporelles. Dans Advances in Neural Information Processing Systems (NeurIPS).
.. [#Liu2022BOND] Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K., Sun, L., Li, J., Chen, G.H., Jia, Z. et Yu, P.S., 2022. BOND : benchmark de la détection non supervisée de nœuds aberrants sur des graphes attribués statiques. Dans Advances in Neural Information Processing Systems (NeurIPS).
investigateiterateTalk Python To Me #497 <https://talkpython.fm/episodes/show/497/outlier-detection-with-python>Real Python Podcast #208 <https://realpython.com/podcasts/rpp/208/>aidoczh.com <https://www.aidoczh.com>exemple <https://github.com/yzhao062/pyod/blob/development/examples/kde_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/sampling_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/gmm_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/pca_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/kpca_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/mcd_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/cd_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ocsvm_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/lmdd_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/lof_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/cof_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/cof_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/cblof_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/loci_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/hbos_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/hdbscan_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/sod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/rod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/iforest_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/inne_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/dif_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/feature_bagging_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/lscp_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/xgbod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/loda_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/suod_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/auto_encoder_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/vae_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/vae_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/so_gaal_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/mo_gaal_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/deepsvdd_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/alad_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/ae1svm_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/devnet_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/rgraph_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/lunar_example.py>__)exemple <https://github.com/yzhao062/pyod/blob/development/examples/embedding_od_example.py>__)exemple radar <https://github.com/yzhao062/pyod/blob/development/examples/pyg_radar_example.py>__)exemple anomalous <https://github.com/yzhao062/pyod/blob/development/examples/pyg_anomalous_example.py>__)exemple scan <https://github.com/yzhao062/pyod/blob/development/examples/pyg_scan_example.py>__)