-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-mi.sh
executable file
·85 lines (66 loc) · 1.15 KB
/
run-mi.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
85
#!/bin/sh
max_jobs=4
cur_jobs=0
if [ -n "$1" ]
then
max_jobs="$1"
fi
threshs=$(seq 0 0.003125 0.05)
wins=$(echo 5; echo 10; seq 50 50 500)
mkdir -p results
manage_jobs() {
cur_jobs=$((cur_jobs+1))
if [ "$cur_jobs" -gt "$max_jobs" ]
then
wait -n
cur_jobs=$((cur_jobs-1))
fi
}
twitter() {
dsets=(AAPL GOOG AMZN FB)
for dset in ${dsets[@]}
do
outfile="results/mi-$dset.csv"
./newumi.py --win-size "$win" \
--thresh "$thresh" \
--twitter "$dset" \
>> "$outfile" &
manage_jobs
done
}
yahoo() {
dsets=(real_7 real_19)
for dset in ${dsets[@]}
do
outfile="results/mi-$dset.csv"
./newumi.py --win-size "$win" \
--thresh "$thresh" \
--yahoo \
-if "A1Benchmark/$dset.csv" \
>> "$outfile" &
manage_jobs
done
}
kdd() {
dsets=(smtp.mat http.mat)
for dset in ${dsets[@]}
do
outfile="results/mi-$dset.csv"
./newumi.py --win-size "$win" \
--thresh "$thresh" \
--kdd \
-if "$dset" \
>> "$outfile" &
manage_jobs
done
}
for win in ${wins[@]}
do
for thresh in ${threshs[@]}
do
# twitter
# yahoo
kdd
done
done
wait