-
Notifications
You must be signed in to change notification settings - Fork 1
/
trainTREC.sh
executable file
·195 lines (125 loc) · 11.4 KB
/
trainTREC.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#!/bin/bash
# runs all trainings for big TREC data and saves result models into respective folders
# exit when any command fails
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
export LD_PRELOAD=libGLX_mesa.so.0 #very dirty hack to workaround this octave bug: error: __osmesa_print__:
#Depth and stencil doesn't match, are you sure you are using OSMesa >= 9.0?
GIT_ROOT="$(git rev-parse --show-toplevel)"
PATH_TO_EXECUTABLE_DELTR=$GIT_ROOT/deltr-src
PATH_TO_EXECUTABLE_LISTNET=$GIT_ROOT/listnet-src
PATH_TO_TREC_DATASET=$GIT_ROOT/data/TREC
RESULT_DIR=$GIT_ROOT/results/TREC
GAMMA_SMALL=20000
GAMMA_LARGE=500000
echo ""
###############################################################################
FOLD=fold_1
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE
################################################################################
FOLD=fold_2
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE
##################################################################################
FOLD=fold_3
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE
###################################################################################
FOLD=fold_4
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE
####################################################################################
FOLD=fold_5
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $PATH_TO_TRERESULT_DIRC_DATASET/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE
####################################################################################
FOLD=fold_6
echo "$FOLD COLORBLIND..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/COLORBLIND/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/COLORBLIND/model.m
echo "$FOLD PREPROCESSED..."
cd $PATH_TO_EXECUTABLE_LISTNET
./train.m $RESULT_DIR/$FOLD/PREPROCESSED/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED.csv $RESULT_DIR/$FOLD/PREPROCESSED/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PPlus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PPlus/model.m
./train.m $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train_RERANKED_PMinus.csv $RESULT_DIR/$FOLD/PREPROCESSED_PMinus/model.m
echo "$FOLD GAMMA=0..."
cd $PATH_TO_EXECUTABLE_DELTR
./train.m $RESULT_DIR/$FOLD/GAMMA\=0/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=0/model.m 0
cp $RESULT_DIR/$FOLD/GAMMA\=0/model.m $RESULT_DIR/$FOLD/FA-IR/model.m
echo "$FOLD GAMMA=SMALL..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=SMALL/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=SMALL/model.m $GAMMA_SMALL
echo "$FOLD GAMMA=LARGE..."
./train.m $RESULT_DIR/$FOLD/GAMMA\=LARGE/ $PATH_TO_TREC_DATASET/$FOLD/features_withListNetFormat_withGender_withZscore_candidateAmount-200_train.csv $RESULT_DIR/$FOLD/GAMMA\=LARGE/model.m $GAMMA_LARGE