summaryrefslogtreecommitdiff
path: root/scripts/geoquery/cv.sh
blob: bd414747faed81ed60df95a1776a51b9ecea9fbf (plain)
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
#!/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