From 5bfb3b1a0d6d964ee4b1a2c522587699a6c6be2f Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 25 Apr 2014 18:29:10 +0200 Subject: README, cv script --- scripts/geoquery/cv.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 scripts/geoquery/cv.sh (limited to 'scripts') diff --git a/scripts/geoquery/cv.sh b/scripts/geoquery/cv.sh new file mode 100755 index 0000000..bd41474 --- /dev/null +++ b/scripts/geoquery/cv.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +function wait_for() +{ + echo "Waiting for ${#WAITFOR[@]} procs..." + echo ${WAITFOR[*]} + for pid in ${WAITFOR[@]}; do + wait $pid; + done +} + +killall memcached +memcached & + +K=100 +J=10 +STOPWORDS=/path/to/stopwords.en + +for VARIANT in rebol rampion exec; do +for E in 0.3 0.1 0.01 0.03 0.003 0.001 0.0003 0.0001; do +for INI in /paths/to/cdec/inis; do +for INIT_WEIGHTS in /paths/to/weight/files; do +WAITFOR=() +for FOLD in {0..9}; do + +NAME="v=$VARIANT.fold=$FOLD.e=$E.c=$(basename $INI).w=$(basename $INIT_WEIGHTS)" + +../rampfion.rb \ + -k $K \ + -i /path/to/folds600/$FOLD/train.in \ + -r /path/tod/folds600/$FOLD/train.en \ + -g /path/to/folds600/$FOLD/train.gold \ + -h /path/to/folds600/$FOLD/train.funql \ + -w $INIT_WEIGHTS \ + -t $STOPWORDS \ + -c $INI \ + -b $(pwd)/cfg.rb \ + -e $E \ + -j $J \ + -v $VARIANT \ + -o $NAME.weights &> $NAME.output & +WAITFOR+=( $! ) + +done +wait_for $WAITFOR +done +done +done +done + -- cgit v1.2.3