summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2014-04-25 18:29:10 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2014-04-25 18:29:10 +0200
commit5bfb3b1a0d6d964ee4b1a2c522587699a6c6be2f (patch)
treef5d550f23a835a882ca5c5bbfdc6e4b637601925 /scripts
parent5f04f17907ce37a8e8dd6cff9cb6dc026b30b8f6 (diff)
README, cv script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/geoquery/cv.sh50
1 files changed, 50 insertions, 0 deletions
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
+