vectorspacelab/arex-skill/anomaly-detection

Claude Code and agent skill by vectorspacelab/arex-skill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

"Guides PyPOTS anomaly-detection workflows, including detector

Install

npx vskill@latest install vectorspacelab/arex-skill/anomaly-detection

SKILL.md

The same SKILL.md was published earlier as vectorspacelab/arex-skill/anomaly-detection.

PyPOTS Anomaly Detection

Use this sub-skill when the user wants PyPOTS to detect anomalous timesteps or samples in partially-observed time series.

Natural Triggers

  • "detect anomalies with PyPOTS"
  • "use TimesNet / TEFN / TimeMixer / Transformer for anomaly detection"
  • "what does anomaly_rate do?"
  • "read predict()[\"anomaly_detection\"]"
  • "compute accuracy, precision, recall, or F1 for anomaly labels"
  • "why are anomaly labels named anomaly_y in tests?"

First References

anomaly_y, and CLI label caveats.

keys.

choice.

result-key failures.

  • Use `../cli/` for CLI-driven train/predict/evaluate flows.

Scope

This route covers:

  • Detector models such as TimesNet, TEFN, TimeMixer, Transformer,

FiLM, SegRNN, ImputeFormer, PatchTST, DLinear, SAITS, iTransformer, Crossformer, Pyraformer, FEDformer, Informer, ETSformer, NonstationaryTransformer, and TimeMixerPP.

  • Constructor-time anomaly_rate handling.
  • Result extraction through predict()["anomaly_detection"] or detect().
  • Binary classification-style metrics for anomaly labels.
  • In-memory dict and HDF5 lazy-loading inputs.

Route elsewhere:

Core Workflow

  1. Prepare X with shape [n_samples, n_steps, n_features].
  2. Choose an anomaly_rate in (0, 1) that matches expected anomaly density.
  3. Instantiate the detector with n_steps, n_features, anomaly_rate, and

model-specific architecture fields.

  1. Train with fit(train_set, val_set) where train/validation dicts contain at

least X; native fixtures also keep anomaly_y for metric checks.

  1. Predict with predict(test_set) and read results["anomaly_detection"], or

call detect(test_set).

  1. Evaluate with calc_acc and calc_precision_recall_f1 when ground-truth

anomaly labels are available.

Minimal Example Shape

python
from pypots.anomaly_detection import TimesNet
model = TimesNet(
n_steps=n_steps,
n_features=n_features,
anomaly_rate=0.05,
n_layers=1,
top_k=1,
d_model=16,
d_ffn=16,
n_kernels=3,
epochs=1,
device="cpu",
)
model.fit({"X": train_X}, {"X": val_X})
anomalies = model.detect({"X": test_X})

If using native test-style labels, keep:

python
test_anomaly_y = dataset["test_anomaly_y"].flatten()

Then compare model outputs to those labels with the metric helpers.

Common Decision Points

  • Use a tiny CPU fixture before a large detector run.
  • Verify 0 < anomaly_rate < 1; the base detector asserts this range.
  • Do not reuse a forecasting or imputation config for anomaly detection without

checking task-specific constructor parameters.

  • Make sure the evaluation label key matches the code path. Native tests use

anomaly_y; CLI evaluation currently checks binary targets through y.

  • If the model emits scores instead of hard labels, confirm the metric helper's

expected input before interpreting the result.

Validation Signals

A successful anomaly workflow returns anomaly_detection and can compute finite accuracy/precision/recall/F1 values against the chosen binary label array.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
324
Repository forks
25
7-day trend score
29

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/vectorspacelab/arex-skill/anomaly-detection/badge)](https://verified-skill.com/skills/vectorspacelab/arex-skill/anomaly-detection)

Something wrong with this skill or its page? Tell us.