X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=graph.sh;h=70f6a9442b0191c5ac1cda9eace606fb94df8673;hb=71a84ea2658cd96726bcf4e582010c24bf2583cf;hp=b54fcf4097c78924c72cac850af0180613bdbd0b;hpb=d922ad61d35e9a6996730bec24b16f8bf7bc426c;p=folded-ctf.git
diff --git a/graph.sh b/graph.sh
index b54fcf4..70f6a94 100755
--- a/graph.sh
+++ b/graph.sh
@@ -13,35 +13,37 @@
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see . #
# #
-# Written and (C) by Francois Fleuret #
+# Written by Francois Fleuret #
+# (C) Idiap Research Institute #
+# #
# Contact for comments & bug reports #
#########################################################################
-echo "Parsing the log files"
+GRAPH_NAME="/tmp/roc.eps"
+
+#########################################################################
+
+echo "Parsing the log files."
for p in hb h+b; do
- grep ^INFO results/${p}-*/log | grep "FALSE_NEGATIVE_RATE\|PER_VGA" | \
- sed -e "s/[^0-9A-Z_ .]//g" | \
+ grep ^INFO results/${p}-*/log | \
awk '{
if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
printf(1-$3)
- } else {
+ } else if($2 == "DECIMATED_NB_FALSE_POSITIVES_PER_VGA") {
printf(" "$3"\n")
}
}' | sort -g > /tmp/${p}
+ if [[ ! -s /tmp/${p} ]]; then
+ echo "Not enough data points for ${p}." >&2
+ exit 1
+ fi
done
-if [[ ! -s /tmp/hb ]] || [[ ! -s /tmp/h+b ]]; then
- echo "Not enough data points." >&2
- exit 1
-fi
-
######################################################################
-echo "Generating the graph per se"
-
-GRAPH_NAME="/tmp/roc.eps"
+echo "Generating the graph per se."
gnuplot<