-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
63 lines (57 loc) · 1.09 KB
/
main.cpp
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
#include <iostream>
#include <vector>
#include <random>
#include <string>
#include <sstream>
#include <map>
#include <numeric>
#include "vw.h"
#include "rand48.h"
#include "conditional_contextual_bandit.h"
#include "common.h"
#include "diversity_experiments.h"
#include "ctr_experiments.h"
#include "discovery_experiments.h"
void print_usage(char* exe_name)
{
std::cerr << "Usage: " << exe_name << " [1|2|3|4]\n"
<< "\t 1 - diversity\n"
<< "\t 2 - slot dependent ctr\n"
<< "\t 3 - discovery\n"
<< "\t 4 - progressive ctr coin\n"
<< "\t 5 - progressive ctr normal\n";
}
int main(int argc, char* argv[])
{
if (argc != 2)
{
print_usage(argv[0]);
return 1;
}
std::string arg_str(argv[1]);
if (arg_str == "1")
{
diversity();
}
else if (arg_str == "2")
{
slot_dependent_ctr();
}
else if (arg_str == "3")
{
discovery_rate();
}
else if (arg_str == "4")
{
progressive_ctr(true);
}
else if (arg_str == "5")
{
progressive_ctr(false);
}
else
{
print_usage(argv[0]);
return 1;
}
}