-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathrun_sensitivity.sh
executable file
·49 lines (39 loc) · 1.39 KB
/
run_sensitivity.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
#########################################################################
# File Name: run.sh
# Author: Lin Ma
# mail: [email protected]
# Created Time: 07/09/17
#########################################################################
#!/bin/bash
trap onexit 1 2 3 15
function onexit() {
local exit_status=${1:-$?}
pkill -f hstore.tag
exit $exit_status
}
# ---------------------------------------------------------------------
# remove the log file
if [ -f run.log ] ; then
rm run.log
fi
for RHO in '0.55' '0.65' '0.75' '0.85' '0.95'; do
for HORIZON in '60' '1440'; do
for PROJECT in 'tiramisu' 'oli' 'admission'; do
for METHOD in 'ar'; do
cmd="time python3.5 exp_multi_online_continuous.py $PROJECT --method $METHOD --aggregate 60
--horizon $HORIZON
--input_dir ~/peloton-tf/time-series-clustering/online-clusters-sensitivity/$PROJECT/$RHO/
--cluster_path ~/peloton-tf/time-series-clustering/cluster-coverage-sensitivity/$PROJECT/$RHO/coverage.pickle
--output_dir ../prediction-sensitivity-result/$PROJECT/$RHO/"
echo $cmd
echo $cmd >> run.log
START=$(date +%s)
eval $cmd &
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "Execution time: $DIFF seconds"
echo -e "Execution time: $DIFF seconds\n" >> run.log
done # METHOD
done # PROJECT
done # HORIZON
done # RHO