Brush C++ API
A flexible interpretable machine learning framework
Toggle main menu visibility
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
8
namespace
Brush
{
9
namespace
MAB
{
10
11
class
DummyBandit
:
public
BanditOperator
12
{
13
public
:
14
DummyBandit
(vector<string> arms) :
BanditOperator
(arms) {};
15
DummyBandit
(map<string, float> arms_probs) :
BanditOperator
(arms_probs) {};
16
~DummyBandit
(){};
17
18
std::map<string, float>
sample_probs
(
bool
update
);
19
string
choose
();
20
void
update
(
string
arm,
float
reward);
21
22
private
:
23
// additional stuff should come here
24
};
25
26
}
// MAB
27
}
// Brush
28
29
#endif
// DUMMY_H
bandit_operator.h
Brush::MAB::BanditOperator::BanditOperator
BanditOperator(vector< string > arms)
Constructs a BanditOperator object with a vector of arms.
Definition
bandit_operator.cpp:6
Brush::MAB::DummyBandit::update
void update(string arm, float reward)
Updates the reward for a specific arm.
Definition
dummy.cpp:16
Brush::MAB::DummyBandit::choose
string choose()
Chooses an arm based on the given tree and fitness. Should call sample_probs internally.
Definition
dummy.cpp:10
Brush::MAB::DummyBandit::DummyBandit
DummyBandit(vector< string > arms)
Definition
dummy.h:14
Brush::MAB::DummyBandit::sample_probs
std::map< string, float > sample_probs(bool update)
Samples the probabilities of the arms.
Definition
dummy.cpp:6
Brush::MAB::DummyBandit::DummyBandit
DummyBandit(map< string, float > arms_probs)
Definition
dummy.h:15
Brush::MAB::DummyBandit::~DummyBandit
~DummyBandit()
Definition
dummy.h:16
Brush::MAB
Definition
bandit.cpp:4
Brush
< nsga2 selection operator for getting the front
Definition
bandit.cpp:3
src
bandit
dummy.h
Generated by
1.17.0