Command Palette

Search for a command to run...

Назад к скиллам
скилл № 52026

ml-anomaly-detection

Use when the user asks about anomaly or outlier detection: Z-score/IQR baselines, Isolation Forest, LOF, autoencoders, time-series anomalies, fraud or sensor…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить ml-anomaly-detection в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

ML Anomaly Detection

Quick Start

from sklearn.ensemble import IsolationForest
model = IsolationForest(contamination=0.05).fit(X_train)
predictions = model.predict(X_test)
anomalies = X_test[predictions == -1]

Purpose

Design anomaly detection systems with appropriate statistical, proximity-based, ensemble, and deep learning methods, including evaluation protocols and real-time deployment pipelines.

Architecture/Decision Trees

Method Selection Decision Tree

Data characteristics
  ├── Low-dimensional tabular (< 50 features)
  │   ├── Need interpretability, fast baseline
  │   │   ├── Normal distribution → Z-score / Modified Z-score (MAD)
  │   │   └── Any distribution → IQR (non-parametric)
  │   ├── Varying density clusters → LOF (Local Outlier Factor)
  │   ├── Best general purpose → Isolation Forest
  │   ├── Clean training data, novelty detection → One-Class SVM
  │   └── Mixed feature types → HBOS (Histogram-based, fast)
  ├── High-dimensional tabular (> 50 features)
  │   ├── Scales well → Isolation Forest (O(n log n))
  │   ├── Non-linear compression → Autoencoder (needs >1000 normal samples)
  │   ├── Probabilistic separation → VAE
  │   └── Very fast → HBOS (feature-independent histograms)
  ├── Time-series
  │   ├── Regular seasonality → STL decomposition + residual Z-score
  │   ├── Known pattern → Twitter AnomalyDetection / Prophet
  │   ├── Complex temporal dependencies → LSTM Autoencoder
  │   └── Real-time → Moving average + deviation bands
  └── Image/Video
      ├── Reconstruction-based → Autoencoder / VAE
      ├── Feature-based → DeepSVDD (hypersphere around normal)
      └── Patch-based → PatchCore (memory bank of normal patches)

Anomaly Type Decision Tree

What kind of anomaly?
  ├── Point anomaly (single value far from norm)
  │   └── Z-score, IQR, Isolation Forest, Autoencoder
  ├── Contextual anomaly (normal value, wrong context)
  │   ├── Time context (e.g., high spending at 3 AM)
  │   │   └── Time-series decomposition + contextual Z-score
  │   └── Spatial context (e.g., high temp in antarctica)
  │       └── Conditional anomaly detection with context features
  └── Collective anomaly (unusual sequence)
      ├── Fixed-length window → LSTM Autoencoder
      └── Variable-length sequence → Sequence matching, DTW

Threshold Selection Decision Tree

Do you have labeled validation data?
  ├── YES (partially labeled)
  │   └── Tune threshold to maximize F1 or precision@k
  ├── NO
  │   ├── Statistical approach
  │   │   ├── Z-score threshold 3 (99.7% CI) or 2.5 (99%)
  │   │   └── IQR multiplier 1.5 (moderate) or 3 (extreme)
  │   ├── Percentile approach
  │   │   ├── 99th percentile of anomaly scores
  │   │   └── 95th percentile for more sensitivity
  │   ├── Elbow method → knee in sorted anomaly score curve
  │   └── Domain-driven
  │       └── Acceptable false positive rate determines threshold

Agent Protocol

Trigger

User request includes: anomaly detection, outlier detection, Isolation Forest, LOF, autoencoder, one-class SVM, statistical methods, Z-score, IQR, real-time anomaly, time-series anomaly, novelty detection, fraud detection, outlier removal.

Input Context

Before activating, verify:

  • Data characteristics: dimensionality, number of samples, feature types (continuous, categorical, mixed).
  • Expected anomaly rate (rare <1%, moderate 1-5%, frequent >5%).
  • Anomaly type: point anomaly, contextual anomaly, collective anomaly.
  • Whether training data contains anomalies (outlier detection) or is clean (novelty detection).
  • Label availability: fully labeled, partially labeled, or completely unlabeled.
  • Time dependence: independent (iid) or time-ordered (time series).

Output Artifact

Anomaly detection framework with method selection, model config, evaluation, real-time pipeline.

Response Format

## Anomaly Detection Framework
### Data Profile
Dimensions: {N} | Samples: {N} | Type: {tabular / time-series / high-dim}
Expected Anomaly Rate: {value}%
Anomaly Type: {point / contextual / collective / novelty}

### Method
Primary: {Z-score / IQR / LOF / Isolation Forest / Autoencoder / VAE / DeepSVDD}
Contamination: {auto / value}
Threshold: {N std / percentile / reconstruction error}
Interpretability: {high / medium / low}

### Evaluation
Labels Available: {true / false}
Method: {precision@k / AUC / F1 / expert review}
Target: {precision > value / recall > value}

### Pipeline
Frequency: {batch / streaming / real-time}
Window: {N seconds / N rows}
Alert: {threshold / anomaly score spike / ensemble vote}

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.

Completion Criteria

  • Data characteristics documented: dimensions, anomaly rate, type, time dependence.
  • Statistical baseline method applied (Z-score or IQR) as first pass.
  • Primary detection method selected matching data type and interpretability needs.
  • Model parameters configure
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/anomaly-detection-advanced.md
  • references/anomaly-detection-fundamentals.md
  • references/anomaly-evaluation.md
  • references/classical-anomaly.md
  • references/deep-learning-anomaly.md
  • references/ml-based-detection.md
  • references/online-anomaly.md
  • references/statistical-methods.md

FAQ

Что делает скилл ml-anomaly-detection?

Use when the user asks about anomaly or outlier detection: Z-score/IQR baselines, Isolation Forest, LOF, autoencoders, time-series anomalies, fraud or sensor outliers and alert thresholds. Produces method choice by data type, model config and evaluation with labeled or synthetic anomalies. Not for data pipeline volume monitors (use data-data-observability).

Как установить скилл ml-anomaly-detection?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ml-anomaly-detection запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ml-anomaly-detection с