cathrica commited on
Commit
908bfe5
·
verified ·
1 Parent(s): d1e780d

Add reproducibility script

Browse files
Files changed (1) hide show
  1. reproduce.sh +40 -0
reproduce.sh ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reproduce all experiments for Explainable IDS project
3
+ # Usage: bash reproduce.sh
4
+
5
+ set -e
6
+
7
+ echo "========================================"
8
+ echo "Explainable IDS — Full Reproduction"
9
+ echo "========================================"
10
+
11
+ # Install dependencies
12
+ echo "Step 0: Installing dependencies..."
13
+ pip install -r requirements.txt -q
14
+
15
+ # Step 1: Preprocess data
16
+ echo ""
17
+ echo "Step 1: Preprocessing NSL-KDD dataset..."
18
+ python data/preprocess.py
19
+
20
+ # Step 2: Train all models
21
+ echo ""
22
+ echo "Step 2: Training models (MLP, LSTM, 1D-CNN)..."
23
+ python experiments/train_baseline.py
24
+
25
+ # Step 3: Explainability analysis (SHAP + LIME)
26
+ echo ""
27
+ echo "Step 3: Running explainability analysis..."
28
+ python explainability/shap_analysis.py
29
+
30
+ # Step 4: Stability evaluation
31
+ echo ""
32
+ echo "Step 4: Running stability evaluation..."
33
+ python explainability/stability_eval.py
34
+
35
+ echo ""
36
+ echo "========================================"
37
+ echo "All experiments complete!"
38
+ echo "Results in: results/"
39
+ echo "Models in: saved_models/"
40
+ echo "========================================"