-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiments_real.sh
executable file
·84 lines (62 loc) · 2.09 KB
/
experiments_real.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
81
82
83
84
#!/bin/bash
DIR="../dataset-real"
MPTS=60
SEPARATOR=","
CORE=false
CORE_INC=false
CORE_STAR=false
RNG=false
ALL=false
run_performance() {
for data in "fma_chroma_cens" "fma_mfcc" "20news_1000d" "20news_500d_pca" "imagenet_sample";
do
if $CORE || $ALL ; then
python main_experiments.py "${DIR}/${data}.csv" "${MPTS}" ${SEPARATOR} "core" >> "real-data-core.results"
fi
if $CORE_INC || $ALL ; then
python main_experiments.py "${DIR}/${data}.csv" "${MPTS}" ${SEPARATOR} "core_inc" >> "real-data-core-inc.results"
fi
if $CORE_STAR || $ALL ; then
python main_experiments.py "${DIR}/${data}.csv" "${MPTS}" ${SEPARATOR} "core_star" >> "real-data-core-star.results"
fi
if $RNG || $ALL ; then
python main_experiments.py "${DIR}/${data}.csv" "${MPTS}" ${SEPARATOR} "rng" >> "real-data-rng.results"
fi
done
}
run_speedup() {
for data in "fma_chroma_cens" "fma_mfcc" "20news_1000d" "20news_500d_pca" "imagenet_sample";
do
# python main_experiments.py "${DIR}/${data}.csv" 60 "${SEPARATOR}" "single_k" >> "real-data-single-k.results"
python main_experiments.py "${DIR}/${data}.csv" 60 "${SEPARATOR}" "single_k_star" >> "real-data-single-k-star.results"
# python main_experiments.py "${DIR}/${data}.csv" 60 "${SEPARATOR}" "single" >> "real-data-single.results"
done
}
MET=${1^^}
if [[ ! -d "$DIR" ]]
then
echo "[ERROR] The directory $DIR does not exist on your filesystem. Please enter a valid directory."
exit 1
fi
if [[ $MET == "CORE" || $MET == "ALL" ]]; then
CORE=true
fi
if [[ $MET == "CORE_INC" || $MET == "ALL" ]]; then
CORE_INC=true
fi
if [[ $MET == "CORE_STAR" || $MET == "ALL" ]]; then
CORE_STAR=true
fi
if [[ $MET == "RNG" || $MET == "ALL" ]]; then
RNG=true
fi
ALL=[[ $CORE && $CORE_INC && $RNG ]]
SECONDS=0
for i in $(seq 1)
do
# run_performance
run_speedup
done
DURATION=$SECONDS
echo "Done!"
echo "Total Duration: $(($DURATION / 3600)) hours, $((($DURATION / 60) % 60)) minutes and $(($DURATION % 60)) seconds elapsed."