20 #include "../common/jsonconfig.hpp"
26 using jubatus::util::lang::shared_ptr;
40 ar & JUBA_MEMBER(assume_unrewarded) & JUBA_MEMBER(epsilon);
49 ar & JUBA_MEMBER(assume_unrewarded);
59 ar & JUBA_MEMBER(assume_unrewarded) & JUBA_MEMBER(tau);
69 ar & JUBA_MEMBER(assume_unrewarded) & JUBA_MEMBER(gamma);
74 const std::string& name,
76 if (name ==
"epsilon_greedy") {
77 if (param.
type() == json::json::Null) {
80 "parameter block is not specified in config"));
83 config_cast_check<epsilon_greedy_config>(param);
84 return shared_ptr<bandit_base>(
86 }
else if (name ==
"ucb1") {
87 if (param.
type() == json::json::Null) {
90 "parameter block is not specified in config"));
93 config_cast_check<ucb1_config>(param);
95 }
else if (name ==
"softmax") {
96 if (param.
type() == json::json::Null) {
99 "parameter block is not specified in config"));
102 return shared_ptr<bandit_base>(
104 }
else if (name ==
"exp3") {
105 if (param.
type() == json::json::Null) {
108 "parameter block is not specified in config"));
110 exp3_config conf = config_cast_check<exp3_config>(param);
111 return shared_ptr<bandit_base>(
T config_cast_check(const config &c)
jubatus::util::text::json::json::json_type_t type() const
#define JUBATUS_EXCEPTION(e)
static jubatus::util::lang::shared_ptr< bandit_base > create(const std::string &name, const common::jsonconfig::config ¶m)