-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdo-predictive
executable file
·53 lines (44 loc) · 1.38 KB
/
do-predictive
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
#!/bin/bash
set -e # kill script if there is an error
EXEC="./evaluation_predictive.native"
GRAPHS=graphs-predictive
SRC=$1/gpx #take working dir as first argument
GEOLIFE="Geolife Trajectories 1.3"
export OCAMLRUNPARAM=b
echo convert geolife .plt files to .gpx
mkdir -p $SRC
$EXEC geolife2gpx $1/"$GEOLIFE"/Data $SRC-tree
cp $SRC-tree/*/Trajectory/*.gpx $SRC
echo filter
$EXEC filter $SRC &> $SRC-filtered.dump
echo sample every 30 minutes
(/usr/bin/time -v $EXEC sample $SRC-filtered 1 30 5) &> $SRC-filtered-sampled-1-30-5.dump
echo sample every 60 minutes
(/usr/bin/time -v $EXEC sample $SRC-filtered 1 60 5) &> $SRC-filtered-sampled-1-60-5.dump
ARGS=(\
"0.6 0. 10. false"\
"0.6 0. 10. true "\
"0.75 0. 30. false"\
"0.75 0. 30. true "\
"0.6 1000. 0. false"\
"0.6 1000. 0. true "\
"0.7 3000. 0. false"\
"0.7 3000. 0. true ")
echo sanitize sample 30m
LOG=$SRC-filtered-sampled-1-30-5-sanitized.dump
echo run 1-30-5 &> $LOG
for i in ${!ARGS[*]}
do
echo ${ARGS[$i]} &>> $LOG
(/usr/bin/time -v $EXEC run $SRC-filtered-sampled-1-30-5 ${ARGS[$i]}) &>> $LOG
done
echo sanitize sample 60m
LOG=$SRC-filtered-sampled-1-60-5-sanitized.dump
echo run 1-60-5 &> $LOG
for i in ${!ARGS[*]}
do
echo ${ARGS[$i]} &>> $LOG
(/usr/bin/time -v $EXEC run $SRC-filtered-sampled-1-60-5 ${ARGS[$i]}) &>> $LOG
done
echo generate graphs
for i in $(ls -d $SRC-*-sanitized); do $GRAPHS $i; done