Skip to content
Back to skills

Nsl Kdd Eval

ASecurity

Evaluates network intrusion detection systems on imbalanced network traffic data by classifying records as normal or anomalous. It probes the model's ability to handle class imbalance and detect rare attack patterns in high-dimensional feature spaces. Use when the user wants to benchmark on NSL-KDD, or asks about evaluating this task. Reports F1 score.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythongoperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill nsl-kdd-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nsl Kdd Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nsl Kdd Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-nsl-kdd-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-nsl-kdd-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nsl-kdd-eval
description: Evaluates network intrusion detection systems on imbalanced network traffic data by classifying records as normal or anomalous. It probes the model's ability to handle class imbalance and detect rare attack patterns in high-dimensional feature spaces. Use when the user wants to benchmark on NSL-KDD, or asks about evaluating this task. Reports F1 score.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2202.01332
  bibtex_key: xu2022bigan
  confidence: high
---

# nsl-kdd-eval

> Training a Bidirectional GAN-based One-Class Classifier for Network Intrusion Detection — Xu et al. (2022) (arXiv:2202.01332, 2022)

## What this evaluates

Evaluates network intrusion detection systems on imbalanced network traffic data by classifying records as normal or anomalous. It probes the model's ability to handle class imbalance and detect rare attack patterns in high-dimensional feature spaces.

## Datasets

- **NSL-KDD** — total ?; splits: test (22544)

## Metrics

- `F1 score` **(primary)** — range: [0, 1]
  - Harmonic mean of precision and recall: 2 * (Precision * Recall) / (Precision + Recall).
- `Accuracy` — range: [0, 1]
  - Ratio of correctly classified samples to total samples: (TP + TN) / (TP + TN + FP + FN).
- `Precision` — range: [0, 1]
  - Ratio of correctly predicted anomalies to all predicted anomalies: TP / (TP + FP).
- `Recall` — range: [0, 1]
  - True Positive Rate: TP / (TP + FN).
- `AUC_ROC` — range: [0, 1]
  - Area under the Receiver Operating Characteristic curve, plotting TPR against FPR across thresholds.

## Input / output format

**Input**: Network traffic records represented as feature vectors.

**Output**: Binary classification label (normal or anomaly).

## Scoring recipe

```python
tp = sum((pred == 1) & (gold == 1))
tn = sum((pred == 0) & (gold == 0))
fp = sum((pred == 1) & (gold == 0))
fn = sum((pred == 0) & (gold == 1))
precision = tp / (tp + fp)
recall = tp / (tp + fn)
f1 = 2 * (precision * recall) / (precision + recall)
accuracy = (tp + tn) / (tp + tn + fp + fn)
return f1, accuracy, precision, recall
```

## Common pitfalls

- The paper uses KDDTrain+ and KDDTest+ subsets of NSL-KDD but does not explicitly state the training split size, only the test size (22,544).
- Metrics are reported as percentages in tables but formulas define them as ratios in [0,1].
- One-class classification is framed as binary anomaly detection, which may cause confusion about thresholding or scoring functions.

## Evidence (verbatim from paper)

> We use the classification accuracy, precision, recall, and F1 score as the performance metrics to evaluate the performance effectiveness of our proposed model. We use: True Positive (TP) indicates the number of correctly predicted anomalies, True Negative (TN) indicates the number of correctly predicted normal instances, False Positive (FP) indicates the number of normal instances that are misclassified as anomalies, and False Negative (FN) indicates the number of anomalies that are misclassified as normal.

## Citation

```bibtex
@misc{xu2022bigan,
  title={Training a Bidirectional GAN-based One-Class Classifier for Network Intrusion Detection},
  author={Xu et al. (2022)},
  year={2022},
  note={arXiv:2202.01332}
}
```

- arXiv: 2202.01332

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.