-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun_all_experiments.sh
80 lines (71 loc) · 2.98 KB
/
run_all_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
73
74
75
76
77
78
79
80
#!/bin/bash
NUM_THREADS=3
NUM_TOPIC_INITIAL=100
NUM_ITER=2000
NUM_BATCHES=10
HOSTS=localhost
#mu0 v0 sigma0
PRIORS_NRM_LOC=(7200 1 720) #location data
PRIORS_NRM_LFM_YOO=(300 1 30) #other data
OUT_FOLDER=models-same-count
mkdir $OUT_FOLDER 2> /dev/null
IN_FOLDER=traces/small
#1. Run the trace with the NormalKernel
#for f in $IN_FOLDER/*.dat; do
# bname=`basename $f`
# out_file=$OUT_FOLDER/$bname-nrm-dyn.h5
#
# if [ "$bname" == "brightkite.dat" ] || [ "$bname" == "four_sq.dat" ]; then
# mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
# --num_iter $NUM_ITER --num_batches $NUM_BATCHES \
# --kernel tstudent \
# --residency_priors "${PRIORS_NRM_LOC[@]/#/+}" --dynamic True \
# --leaveout 0.3
# else
# mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
# --num_iter $NUM_ITER --num_batches $NUM_BATCHES \
# --kernel tstudent \
# --residency_priors "${PRIORS_NRM_LFM_YOO[@]/#/+}" --dynamic True \
# --leaveout 0.3
# fi
#done
#2. Run the trace with no Kernel
for f in $IN_FOLDER/*.dat; do
out_file=$OUT_FOLDER/`basename $f`-noop-not-dyn.h5
mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
--num_iter $NUM_ITER --num_batches $NUM_BATCHES \
--kernel noop --leaveout 0.3
done
#2. Run the trace witn the NormalKernel and not Dynamic
#for f in $IN_FOLDER/*.dat; do
# bname=`basename $f`
# out_file=$OUT_FOLDER/$bname-nrm-not-dyn.h5
# if [ "$bname" == "brightkite.dat" ] || [ "$bname" == "four_sq.dat" ]; then
# mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
# --num_iter $NUM_ITER --num_batches $NUM_BATCHES \
# --kernel tstudent \
# --residency_priors "${PRIORS_NRM_LOC[@]/#/+}" --leaveout 0.3
# else
# mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
# --num_iter $NUM_ITER --num_batches $NUM_BATCHES \
# --kernel tstudent \
# --residency_priors "${PRIORS_NRM_LFM_YOO[@]/#/+}" --leaveout 0.3
# fi
#done
#3. Run the trace with the Bernoulli Kernel
for f in $IN_FOLDER/*.dat; do
out_file=$OUT_FOLDER/`basename $f`-ber-dyn.h5
mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
--num_iter $NUM_ITER --num_batches $NUM_BATCHES \
--kernel eccdf \
--residency_priors 1 $(($NUM_TOPIC_INITIAL - 1)) --dynamic True \
--leaveout 0.3
done
#4. Run the trace with the Bernoulli Kernel and not Dynamic
#for f in $IN_FOLDER/*.dat; do
# out_file=$OUT_FOLDER/`basename $f`-ber-not-dyn.h5
# mpiexec --host $HOSTS -np $NUM_THREADS python main.py $f $NUM_TOPIC_INITIAL $out_file \
# --num_iter $NUM_ITER --num_batches $NUM_BATCHES \
# --kernel eccdf \
# --residency_priors 1 $(($NUM_TOPIC_INITIAL - 1)) --leaveout 0.3
#done