-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevaluate_weak_supervison.sh
77 lines (67 loc) · 1.91 KB
/
evaluate_weak_supervison.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
#!/bin/sh
# Author : Pooneh Mousavi
INPUT_PATH="./data/"
FILENAMES=("PR_Random+Labeled_Data" "PR_NGO+Labeled_Data" "PR_NGO+Random+Labeled_Data")
OUT_PATH="./result_ls/"
GROUP_BY="eventid"
SEEDS="seeds.txt" # Cody will change that
EVENTS=('albertaFloods2013'
'albertaWildfires2019'
'australiaBushfire2013'
'cycloneKenneth2019'
'fireYMM2016'
'hurricaneFlorence2018'
'manilaFloods2013'
'nepalEarthquake2015'
'parisAttacks2015'
'philipinnesFloods2012'
'southAfricaFloods2019'
'typhoonHagupit2014'
'typhoonYolanda2013')
SUFFIX=".json"
SAMPLING_STRATEGY="up"
UP_WEIGHTING=0
#Evaluate Weak Supervison using Label Spreading
for FILENAME in ${FILENAMES[@]}
do
cp template.sbatch $FILENAME.sbatch
for SEED in `cat ${SEEDS}`
do
for EVENT in ${EVENTS[@]}
do
echo python evaluate.py \
--inputpath=$INPUT_PATH$FILENAME$SUFFIX \
--outputpath=$OUT_PATH$F$FILENAME$SUFFIX \
--heldout_event=$EVENT \
--seed_number=$SEED \
--sampling_strategy=$SAMPLING_STRATEGY \
--up_weighting=$UP_WEIGHTING \
--label_spreading=1 \
--groupby_col=$GROUP_BY >> $FILENAME.sbatch
done
done
sbatch --partition datasci $FILENAME.sbatch &
done
#Evaluate Weak Supervison without Label Spreading
FILENAMES2=("PR_NGO+Labeled_Data")
SUFFIX2="_without_label_spreading"
for FILENAME in ${FILENAMES2[@]}
do
cp template.sbatch $FILENAME.nols.sbatch
for SEED in `cat ${SEEDS}`
do
for EVENT in ${EVENTS[@]}
do
echo python evaluate.py \
--inputpath=$INPUT_PATH$FILENAME$SUFFIX \
--outputpath=$OUT_PATH$F$FILENAME$SUFFIX2$SUFFIX \
--heldout_event=$EVENT \
--seed_number=$SEED \
--sampling_strategy=$SAMPLING_STRATEGY \
--up_weighting=$UP_WEIGHTING \
--label_spreading=0 \
--groupby_col=$GROUP_BY >> $FILENAME.nols.sbatch
done
done
sbatch --partition datasci $FILENAME.nols.sbatch &
done