-
Notifications
You must be signed in to change notification settings - Fork 20
/
run.sh
93 lines (77 loc) · 4.31 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#/bin/bash
cd mstream/
make clean
make
cd ../
if [ $1 == "KDD" ]; then
echo "KDD"
echo "Vanilla MSTREAM"
mstream/mstream -t 'data/kddtime.txt' -n 'data/kddnumeric.txt' -c 'data/kddcateg.txt' -o 'score.txt' -a 0.8
python3 results.py --label 'data/kdd_label.txt' --scores 'score.txt'
echo "MSTREAM-PCA"
python3 pca.py --input 'data/kddnumeric.txt'
mstream/mstream -t 'data/kddtime.txt' -n 'pca.txt' -c 'data/kddcateg.txt' -o 'pcascore.txt' -a 0.8
python3 results.py --label 'data/kdd_label.txt' --scores 'pcascore.txt'
echo "MSTREAM-IB"
python3 ib.py --input 'data/kddnumeric.txt' --inputdim 34 --label 'data/kdd_label.txt' --lr 0.01 --numEpochs 100
mstream/mstream -t 'data/kddtime.txt' -n 'ib.txt' -c 'data/kddcateg.txt' -o 'ibscore.txt' -a 0.8
python3 results.py --label 'data/kdd_label.txt' --scores 'ibscore.txt'
echo "MSTREAM-AE"
python3 ae.py --input 'data/kddnumeric.txt' --inputdim 34 --lr 0.01 --numEpochs 100
mstream/mstream -t 'data/kddtime.txt' -n 'ae.txt' -c 'data/kddcateg.txt' -o 'aescore.txt' -a 0.8
python3 results.py --label 'data/kdd_label.txt' --scores 'aescore.txt'
fi
if [ $1 == "UNSW" ]; then
echo "UNSW"
echo "Vanilla MSTREAM"
mstream/mstream -t 'data/unswtime.txt' -n 'data/unswnumeric.txt' -c 'data/unswcateg.txt' -o 'score.txt' -a 0.4
python3 results.py --label 'data/unsw_label.txt' --scores 'score.txt'
echo "MSTREAM-PCA"
python3 pca.py --input 'data/unswnumeric.txt'
mstream/mstream -t 'data/unswtime.txt' -n 'pca.txt' -c 'data/unswcateg.txt' -o 'pcascore.txt' -a 0.4
python3 results.py --label 'data/unsw_label.txt' --scores 'pcascore.txt'
echo "MSTREAM-IB"
python3 ib.py --input 'data/unswnumeric.txt' --inputdim 39 --label 'data/unsw_label.txt' --lr 0.01 --numEpochs 100
mstream/mstream -t 'data/unswtime.txt' -n 'ib.txt' -c 'data/unswcateg.txt' -o 'ibscore.txt' -a 0.4
python3 results.py --label 'data/unsw_label.txt' --scores 'ibscore.txt'
echo "MSTREAM-AE"
python3 ae.py --input 'data/unswnumeric.txt' --inputdim 39 --lr 0.01 --numEpochs 100
mstream/mstream -t 'data/unswtime.txt' -n 'ae.txt' -c 'data/unswcateg.txt' -o 'aescore.txt' -a 0.4
python3 results.py --label 'data/unsw_label.txt' --scores 'aescore.txt'
fi
if [ $1 == "DOS" ]; then
echo "DOS"
echo "Vanilla MSTREAM"
mstream/mstream -t 'data/dostime.txt' -n 'data/dosnumeric.txt' -c 'data/doscateg.txt' -o 'score.txt' -a 0.95
python3 results.py --label 'data/dos_label.txt' --scores 'score.txt'
echo "MSTREAM-PCA"
python3 pca.py --input 'data/dosnumeric.txt'
mstream/mstream -t 'data/dostime.txt' -n 'pca.txt' -c 'data/doscateg.txt' -o 'pcascore.txt' -a 0.95
python3 results.py --label 'data/dos_label.txt' --scores 'pcascore.txt'
echo "MSTREAM-IB"
python3 ib.py --input 'data/dosnumeric.txt' --inputdim 76 --label 'data/kdd_label.txt' --lr 0.01 --numEpochs 200
mstream/mstream -t 'data/dostime.txt' -n 'ib.txt' -c 'data/doscateg.txt' -o 'ibscore.txt' -a 0.95
python3 results.py --label 'data/dos_label.txt' --scores 'ibscore.txt'
echo "MSTREAM-AE"
python3 ae.py --input 'data/dosnumeric.txt' --inputdim 76 --lr 0.0001 --numEpochs 1000
mstream/mstream -t 'data/dostime.txt' -n 'ae.txt' -c 'data/doscateg.txt' -o 'aescore.txt' -a 0.95
python3 results.py --label 'data/dos_label.txt' --scores 'aescore.txt'
fi
if [ $1 == "DDOS" ]; then
echo "DDOS"
echo "Vanilla MSTREAM"
mstream/mstream -t 'data/ddostime.txt' -n 'data/ddosnumeric.txt' -c 'data/ddoscateg.txt' -o 'score.txt' -a 0.95
python3 results.py --label 'data/ddos_label.txt' --scores 'score.txt'
echo "MSTREAM-PCA"
python3 pca.py --input 'data/ddosnumeric.txt'
mstream/mstream -t 'data/ddostime.txt' -n 'pca.txt' -c 'data/ddoscateg.txt' -o 'pcascore.txt' -a 0.95
python3 results.py --label 'data/ddos_label.txt' --scores 'pcascore.txt'
echo "MSTREAM-IB"
python3 ib.py --input 'data/ddosnumeric.txt' --inputdim 76 --label 'data/ddos_label.txt' --lr 0.001 --numEpochs 200
mstream/mstream -t 'data/ddostime.txt' -n 'ib.txt' -c 'data/ddoscateg.txt' -o 'ibscore.txt' -a 0.95
python3 results.py --label 'data/ddos_label.txt' --scores 'ibscore.txt'
echo "MSTREAM-AE"
python3 ae.py --input 'data/ddosnumeric.txt' --inputdim 76 --lr 0.001 --numEpochs 100
mstream/mstream -t 'data/ddostime.txt' -n 'ae.txt' -c 'data/ddoscateg.txt' -o 'aescore.txt' -a 0.95
python3 results.py --label 'data/ddos_label.txt' --scores 'aescore.txt'
fi