-
Notifications
You must be signed in to change notification settings - Fork 6
/
run_all_predictors.sh
executable file
·64 lines (44 loc) · 2.22 KB
/
run_all_predictors.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
#!/bin/bash
# usage: ./run_all_predictors.sh wp
# usage: ./run_all_predictors.sh re
target="$1"
if [ ! -d output ]; then
mkdir output
fi
if [ -f "$target"_predictions.log ]; then
rm "$target"_predictions.log
fi
log_file="$target"_predictions.log
if [ "$target" == "wp" ]; then
python extract_channel_reputation.py -i ./ -o ./output/train_channel_watch_percentage.txt -f "$target" >> "$log_file"
elif [ "$target" == "re" ]; then
python extract_channel_reputation.py -i ./ -o ./output/train_channel_relative_engagement.txt -f "$target" >> "$log_file"
fi
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python duration_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python context_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python sparse_topic_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python sparse_context_topic_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python reputation_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python sparse_all_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
python channel_specific_predictor.py -i ./ -o ./output -f "$target" >> "$log_file"
sleep 60
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' >> "$log_file"
if [ "$target" == "wp" ]; then
python construct_pandas_frame.py -i ./output -o ./output/predicted_wp_df.csv -f "$target" >> "$log_file"
else
python construct_pandas_frame.py -i ./output -o ./output/predicted_re_df.csv -f "$target" >> "$log_file"
fi