-
Notifications
You must be signed in to change notification settings - Fork 0
/
summary_experiments.sh
executable file
·72 lines (51 loc) · 1.73 KB
/
summary_experiments.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
#!/bin/sh
CFG=final_config
ROOT=$(dirname $0)
if [ ! -d $ROOT/out/recall/$CFG/ ]; then
echo "need to create RECALL data first"
exit 1
fi
echo -n "RECALL "
python3 $ROOT/out/recall/parse_results.py $ROOT/out/recall/final_config/cspace*
echo
if [ ! -d $ROOT/out/copy/$CFG/ ]; then
echo "need to create COPY data first"
exit 1
fi
echo -n "COPY "
python3 $ROOT/out/copy/parse_results.py $ROOT/out/copy/final_config/cspace*
echo
if [ ! -f $ROOT/out/compare/$CFG/cspace0/readout_*.pdf ]; then
echo "need to create COMPARE data first"
exit 1
fi
echo "COMPARE:"
for D in $ROOT/out/compare/$CFG/cspace* ; do
CSPACE=$(basename $D)
F=$(echo $D/readout_*.pdf)
echo " $CSPACE: see generated figure $F"
done
echo
if [ ! -f $ROOT/out/frankland_greene/experiment_1/$CFG/cspace0/results.json ]; then
echo "need to create Frankland & Greene experiment 1 data first"
exit 1
fi
echo "Frankland & Greene experiment 1 results:"
for D in $ROOT/out/frankland_greene/experiment_1/$CFG/cspace* ; do
CSPACE=$(basename $D)
EC=$(grep "\"error_C\": " $D/results.json | sed 's/.*: //; s/,$//')
EUV=$(grep "\"error_UV\": " $D/results.json | sed 's/.*: //; s/,$//')
echo " $CSPACE: error C: $EC error S(agent) + S(patient): $EUV"
done
echo
if [ ! -f $ROOT/out/frankland_greene/experiment_2/$CFG/cspace0/results.json ]; then
echo "need to create Frankland & Greene experiment 2 data first"
exit 1
fi
echo "Frankland & Greene experiment 2 results:"
for D in $ROOT/out/frankland_greene/experiment_2/$CFG/cspace* ; do
CSPACE=$(basename $D)
EV=$(grep "\"error_V\": " $D/results.json | sed 's/.*: //; s/,$//')
EU=$(grep "\"error_U\": " $D/results.json | sed 's/.*: //; s/,$//')
echo " $CSPACE: error S(agent): $EV error S(patient): $EU"
done