imputation-anomaly-classification
Configure and debug Time-Series-Library imputation, reconstruction anomaly detection, and UEA time-series classification workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- imputation-anomaly-classification
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Configure and debug Time-Series-Library imputation, reconstruction anomaly detection, and UEA time-series classification workflows.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/metrics-and-results.md2.0 KB
- 参考文档references/task-workflows.md2.7 KB
- 参考文档references/troubleshooting.md3.2 KB
03 SKILL.md 正文
TSLib Imputation, Anomaly Detection, and Classification
Use this sub-skill when the task uses --task_name imputation, anomaly_detection, or classification, or when the user needs help with mask_rate, anomaly_ratio, PSM/MSL/SMAP/SMD/SWAT layouts, UEA .ts files, classification accuracy, or reconstruction-style anomaly metrics.
Route Here
- Build or debug masked imputation commands over ETT/custom CSV datasets.
- Configure reconstruction anomaly detection with PSM, MSL, SMAP, SMD, or SWAT folders.
- Configure UEA time-series classification with
<DatasetName>_TRAIN.tsand<DatasetName>_TEST.ts. - Interpret imputation MAE/MSE, anomaly threshold/accuracy/precision/recall/F-score, and classification accuracy outputs.
- Decide when augmentation flags are relevant to classification or detection experiments.
Reroute
- Generic local file validation,
run.pyparser flags, output folders, or GPU/CPU preflight: use../data-and-cli/SKILL.md. - Forecasting, TimeXer, M4, or zero-shot forecast tasks: use
../forecasting/SKILL.md. - Optional model dependency installation, custom models, and augmentation implementation details: use
../foundation-models-and-customization/SKILL.md.
Quick Patterns
Imputation
python -u run.py \
--task_name imputation --is_training 1 \
--root_path ./dataset/ETT-small/ --data_path ETTh1.csv \
--model_id ETTh1_mask_0.125 --mask_rate 0.125 \
--model TimesNet --data ETTh1 --features M \
--seq_len 96 --label_len 0 --pred_len 0 \
--enc_in 7 --dec_in 7 --c_out 7 \
--train_epochs 1 --num_workers 0 --no_use_gpu
Anomaly detection
python -u run.py \
--task_name anomaly_detection --is_training 1 \
--root_path ./dataset/PSM --model_id PSM \
--model TimesNet --data PSM --features M \
--seq_len 100 --pred_len 0 --enc_in 25 --c_out 25 \
--anomaly_ratio 1.0 --train_epochs 1 --num_workers 0
UEA classification
python -u run.py \
--task_name classification --is_training 1 \
--root_path ./dataset/Heartbeat/ --model_id Heartbeat \
--model TimesNet --data UEA \
--e_layers 2 --d_model 64 --d_ff 128 --top_k 3 \
--batch_size 16 --train_epochs 1 --num_workers 0 --no_use_gpu
Important Task Differences
- Imputation randomly masks entries in
batch_xaccording to--mask_rateand computes MAE/MSE only on masked positions. - Anomaly detection trains a reconstruction model, computes reconstruction energy on train and test windows, thresholds by
100 - anomaly_ratiopercentile, then applies event-level adjustment. - Classification builds model dimensions from the TRAIN and TEST
.tsfiles;seq_len,enc_in, andnum_classare inferred before model construction.
References
references/task-workflows.mdgives complete task recipes and data requirements.references/metrics-and-results.mdexplains task metrics and output files.references/troubleshooting.mdcovers task-specific data, metric, and shape failures.../data-and-cli/scripts/validate_tslib_data.pyvalidates local anomaly/UEA/CSV files without running training.
Avoid
- Do not use anomaly or classification benchmark scripts as smoke tests without rewriting GPU, epoch, data path, and worker settings.
- Do not compare tiny synthetic anomaly/classification metrics to paper results.
- Do not force forecasting channel-count assumptions onto UEA classification; classification derives data dimensions from
.tsfiles.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).