Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
dummy.h
Go to the documentation of this file.
1#include "bandit_operator.h"
2
3#ifndef DUMMY_H
4#define DUMMY_H
5
6#include "bandit_operator.h"
7
8namespace Brush {
9namespace MAB {
10
11// TODO: rename dummy to static or fixed
12
14{
15public:
16 DummyBandit(vector<string> arms) : BanditOperator(arms) {};
17 DummyBandit(map<string, float> arms_probs) : BanditOperator(arms_probs) {};
19
20 std::map<string, float> sample_probs(bool update);
21 string choose();
22 void update(string arm, float reward);
23
24private:
25 // additional stuff should come here
26};
27
28} // MAB
29} // Brush
30
31#endif // DUMMY_H
BanditOperator(vector< string > arms)
Constructs a BanditOperator object with a vector of arms.
void update(string arm, float reward)
Updates the reward for a specific arm.
Definition dummy.cpp:16
string choose()
Chooses an arm based on the given tree and fitness. Should call sample_probs internally.
Definition dummy.cpp:10
DummyBandit(vector< string > arms)
Definition dummy.h:16
std::map< string, float > sample_probs(bool update)
Samples the probabilities of the arms.
Definition dummy.cpp:6
DummyBandit(map< string, float > arms_probs)
Definition dummy.h:17
< nsga2 selection operator for getting the front
Definition bandit.cpp:4