-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxgboost_run_twostep.sh
executable file
·41 lines (33 loc) · 1.19 KB
/
xgboost_run_twostep.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
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage: <conf name>"
exit -1
fi
rm ./model/train.$1.*
rm ./model/test.$1.*
echo make feature
./T.buf/mkbuf.sh $1 Makefile
echo make libsvm-xgboost format input files
java -cp codes/yep/bin/ libsvm_interface.MakeInput $1 ./model/
round=0150
echo begin to run xgboost
cd ./xgboost_run/$1/
xgboost $1.conf num_round=$round
xgboost $1.conf task=pred model_in=$round.model test:data="../../model/train.$1.svm_buffer"
cp pred.txt pred_train.txt
xgboost $1.conf task=pred model_in=$round.model
cp pred.txt pred_test.txt
echo auc evaluation and make submission
java -cp ../../codes/yep/bin evaluation.MakeSubmission pred.txt ../../test.txt submission.txt ../../data/projectIDMapping
cd -
java -cp codes/yep/bin feature.MakeSubTrainFeature $1
echo begin to run xgboost
cd ./xgboost_run/$2/
xgboost $2.conf num_round=$round
xgboost $2.conf task=pred model_in=$round.model test:data="../../model/train.$1.svm_buffer"
cp pred.txt pred_train.txt
xgboost $2.conf task=pred model_in=$round.model
cp pred.txt pred_test.txt
echo auc evaluation and make submission
java -cp ../../codes/yep/bin evaluation.MakeSubmission pred.txt ../../test.txt submission.txt ../../data/projectIDMapping