-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathverify.sh
executable file
·95 lines (60 loc) · 2.25 KB
/
verify.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
94
95
#!/bin/bash
# Horrible script to just count output files etc
# Definitely a work in progress
alg=$1
dornd=$2
RESTARTS=50
echo -e "ALGORITHM: $alg\n"
## -----------------------------------------------------------------------------
EXP_DS=6000
if [ $dornd == "nd" ]; then
EXP_FILES=$((EXP_DS*RESTARTS))
else
EXP_FILES=$EXP_DS
fi
echo "SYNTHETIC DATASETS..."
numlabels=`find "./_output/$alg/synthetic/" -name "labels*.csv" | wc -l`
echo "Label files: $numlabels/$EXP_FILES"
numoutputs=`find "./_output/$alg/synthetic/" -name "output*.csv" | wc -l`
echo "Output files: $numoutputs/$EXP_FILES"
numdatasets=0
for folder in `ls _output/$alg/synthetic/`; do
counted=`ls _output/$alg/synthetic/$folder | wc -l`
echo "In $folder:"
echo -e "\twe found $counted dataset folders"
numdatasets=$(($numdatasets+$counted))
numlabels=`find "./_output/$alg/synthetic/$folder" -name "labels*.csv" | wc -l`
echo -e "\twe found $numlabels label files"
numout=`find "./_output/$alg/synthetic/$folder" -name "output*.csv" | wc -l`
echo -e "\twe found $numout output files"
numerror=`find "./_output/$alg/synthetic/$folder" -name "exception*.csv" | wc -l`
echo -e "\twe found $numerror exception files"
done
echo -e "TOTAL datasets: $numdatasets/$EXP_DS\n"
## -----------------------------------------------------------------------------
EXP_DS=28
if [ $dornd == "nd" ]; then
EXP_FILES=$((EXP_DS*RESTARTS))
else
EXP_FILES=$EXP_DS
fi
MYDIR="./_output/$alg/realworld/"
echo "REAL-WORLD DATASETS..."
if [ -d $MYDIR ]; then
numlabels=`find $MYDIR -name "labels*.csv" | wc -l`
echo "Label files: $numlabels/$EXP_FILES"
numoutputs=`find $MYDIR -name "output*.csv" | wc -l`
echo "Output files: $numoutputs/$EXP_FILES"
counted=`ls $MYDIR | wc -l`
echo "In $MYDIR:"
echo -e "\twe found $counted dataset folders"
numlabels=`find $MYDIR -name "labels*.csv" | wc -l`
echo -e "\twe found $numlabels label files"
numout=`find $MYDIR -name "output*.csv" | wc -l`
echo -e "\twe found $numout output files"
numerror=`find $MYDIR -name "exception*.csv" | wc -l`
echo -e "\twe found $numerror exception files"
echo "TOTAL datasets: $counted/$EXP_DS"
else
echo "No directory $MYDIR"
fi