
표 형식, 시계열, 그래프, 텍스트, 이미지, 오디오 데이터에 걸친 이상 탐지를 위한 Python 라이브러리입니다. 60개 이상의 탐지기, 벤치마크 기반의 ADEngine 오케스트레이션, 그리고 AI 에이전트를 위한 에이전틱 워크플로우를 제공합니다.
.. image:: https://raw.githubusercontent.com/yzhao062/pyod/master/brand/pyod-icon.svg :target: https://pyod.dev :alt: PyOD Ecosystem :width: 84px
PyOD 3: 대규모 에이전트 기반 이상 탐지
|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: Website
.. |badge_pypi| image:: https://img.shields.io/pypi/v/pyod.svg?color=brightgreen :target: https://pypi.org/project/pyod/ :alt: PyPI version
.. |badge_anaconda| image:: https://anaconda.org/conda-forge/pyod/badges/version.svg :target: https://anaconda.org/conda-forge/pyod :alt: Anaconda version
.. |badge_docs| image:: https://readthedocs.org/projects/pyod/badge/?version=latest :target: https://pyod.readthedocs.io/en/latest/?badge=latest :alt: Documentation status
.. |badge_stars| image:: https://img.shields.io/github/stars/yzhao062/pyod.svg :target: https://github.com/yzhao062/pyod/stargazers :alt: GitHub stars
.. |badge_forks| image:: https://img.shields.io/github/forks/yzhao062/pyod.svg?color=blue :target: https://github.com/yzhao062/pyod/network :alt: GitHub forks
.. |badge_downloads| image:: https://pepy.tech/badge/pyod :target: https://pepy.tech/project/pyod :alt: Downloads
.. |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: Testing
.. |badge_coverage| image:: https://coveralls.io/repos/github/yzhao062/pyod/badge.svg :target: https://coveralls.io/github/yzhao062/pyod :alt: Coverage Status
.. |badge_maintainability| image:: https://api.codeclimate.com/v1/badges/bdc3d8d0454274c753c4/maintainability :target: https://codeclimate.com/github/yzhao062/Pyod/maintainability :alt: Maintainability
.. |badge_license| image:: https://img.shields.io/github/license/yzhao062/pyod.svg :target: https://github.com/yzhao062/pyod/blob/master/LICENSE :alt: License
.. |badge_benchmark| image:: https://img.shields.io/badge/ADBench-benchmark_results-pink :target: https://github.com/Minqi824/ADBench :alt: Benchmark
**PyOD는 에이전트를 지원합니다.** Claude Code와 Codex는 ``od-expert`` 스킬을 사용하여 ADEngine 조사를 수행할 수 있으며, MCP 호환 에이전트는 PyOD의 탐지기 지식 및 계획 도구를 쿼리할 수 있습니다. 기존의 ``fit``/``predict`` API는 그대로 유지됩니다.
PyOD 3는 이상 탐지를 위한 가장 포괄적인 Python 라이브러리입니다. 네 가지 핵심 축:
=========================== ========================================================================================
영역 의미
=========================== ========================================================================================
멀티모달 표형, 시계열, 그래프, 텍스트, 이미지, 오디오 데이터를 하나의 API로 처리하는 61개 탐지기
전체 수명 주기 원시 데이터부터 설명된 이상치와 다음 단계 안내까지 단일 호출로 처리
에이전트 기반 od-expert는 자연어 요청을 ADEngine 워크플로로 변환하고, MCP는 다른 에이전트를 위한 구조화된 도구를 제공
최다 사용 4,600만 회 이상 다운로드; 벤치마크 기반 라우팅 (ADBench, TSB-AD, BOND, NLP-ADBench)
=========================== ========================================================================================
설치 ^^^^^^^
핵심 라이브러리 (모든 활성화 경로에 필요):
.. code-block:: bash
pip install pyod
그런 다음 에이전트 스택에 맞는 활성화 경로를 선택하세요:
.. 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
pyod info를 실행하면 버전, 탐지기 수, 각 활성화 경로의 설치 상태를 확인할 수 있습니다. pyod info는 설치된 에이전트 스택(Claude Code의 ~/.claude/, Codex의 ~/.codex/)도 감지하여 올바른 설치 명령을 추천합니다.
conda, 소스 설치, 의존성 세부 정보 및 문제 해결은 전체 설치 가이드 <https://pyod.readthedocs.io/en/latest/install.html>__를 참조하세요. v3.0.0의 레거시 pyod-install-skill 명령은 pyod install skill의 별칭으로 계속 작동합니다.
5줄 코드로 하는 이상치 탐지 (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
PyOD를 사용하는 세 가지 방법:
========= ===================== ====================================================================== =======================================
계층 이름 사용 시점 진입점
========= ===================== ====================================================================== =======================================
1 클래식 API 사용하려는 탐지기를 아는 경우 계층 1 예제 <https://pyod.readthedocs.io/en/latest/examples/tabular.html>__
2 ADEngine PyOD가 자동으로 선택, 비교, 평가해 주기를 원하는 경우 계층 2 튜토리얼 <https://pyod.readthedocs.io/en/latest/examples/adengine.html>__
3 에이전트 기반 조사 AI 에이전트가 자연어 대화를 통해 OD를 수행하길 원하는 경우 계층 3 튜토리얼 <https://pyod.readthedocs.io/en/latest/examples/agentic.html>__
========= ===================== ====================================================================== =======================================
계층 2와 3은 PyOD의 수명 주기 오케스트레이션 핵심인 ADEngine으로 구동됩니다. 계층 3의 전체 다중 턴 조사 흐름은 Claude Code 및 Codex용 od-expert 스킬을 통해 사용할 수 있습니다. MCP 서버(python -m pyod.mcp_server)는 MCP 호환 LLM을 위한 10개의 상태 비저장 도구를 제공하며, 지식 조회(list_detectors, explain_detector, compare_detectors, get_benchmarks), 계획(profile_data, plan_detection, build_detector), 탐지(run_detection, analyze_results, explain_findings)를 아우릅니다. 상태 저장형 investigate / iterate MCP 도구는 나중에 제공될 예정입니다.
.. image:: https://raw.githubusercontent.com/yzhao062/pyod/development/docs/figs/agentic-demo.png :alt: PyOD 3 agentic investigation demo on cardiotocography dataset :align: center :width: 720
위 그림은 UCI Cardiotocography 데이터셋에서 수행된 실제 5턴 에이전트 대화를 보여줍니다. 전체 워크스루 <https://pyod.readthedocs.io/en/latest/examples/agentic.html>, 실행 가능한 에이전트 예제 <https://github.com/yzhao062/pyod/blob/development/examples/agentic_example.py>, 또는 대화형 HTML 데모 <https://htmlpreview.github.io/?https://github.com/yzhao062/pyod/blob/development/examples/agentic_demo.html>__를 참조하세요.
PyOD 생태계 및 리소스:
NLP-ADBench <https://github.com/USC-FORTIS/NLP-ADBench>__ (NLP 이상 탐지) | TODS <https://github.com/datamllab/tods>__ (시계열) | PyGOD <https://pygod.org/>__ (그래프) | ADBench <https://github.com/Minqi824/ADBench>__ (벤치마크) | AD-LLM <https://arxiv.org/abs/2412.11142>__ (LLM 기반 이상 탐지) [#Yang2024ad]_ | 리소스 <https://github.com/yzhao062/anomaly-detection-resources>__
PyOD 소개 ^^^^^^^^^^
2017년에 설립된 PyOD는 가장 오래 운영되었고 가장 널리 사용되는 이상 탐지용 Python 라이브러리입니다. 4,600만 회 이상의 다운로드 <https://pepy.tech/project/pyod>를 기록하며 학술 연구(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>__, Towards Data Science <https://towardsdatascience.com/anomaly-detection-for-dummies-15f148e559c1>__에 소개됨)와 상용 제품 모두에서 사용됩니다.
V3는 고전적인 fit/predict API를 완전히 하위 호환되도록 유지하면서 ADEngine(수명 주기 오케스트레이션)과 od-expert 스킬(에이전트 워크플로)을 추가합니다. V3는 빠른 병렬 학습을 위해 SUOD [#Zhao2021SUOD]_를 기반으로 하고, 모델별 속도 향상을 위해 numba JIT를 사용합니다.