Brush C++ API
A flexible interpretable machine learning framework
Toggle main menu visibility
Loading...
Searching...
No Matches
dummy.cpp
Go to the documentation of this file.
1
#include "
dummy.h
"
2
3
namespace
Brush
{
4
namespace
MAB
{
5
6
std::map<string, float>
DummyBandit::sample_probs
(
bool
update
) {
7
return
this->
probabilities
;
8
}
9
10
string
DummyBandit::choose
() {
11
// std::map<T, float> probs = this->sample_probs(false);
12
13
return
r
.random_choice(this->
probabilities
);
14
}
15
16
void
DummyBandit::update
(
string
arm,
float
reward) {
17
// Do nothing
18
}
19
20
}
// MAB
21
}
// Brush
Brush::MAB::BanditOperator::probabilities
std::map< string, float > probabilities
Definition
bandit_operator.h:66
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::sample_probs
std::map< string, float > sample_probs(bool update)
Samples the probabilities of the arms.
Definition
dummy.cpp:6
dummy.h
Brush::MAB
Definition
bandit.cpp:4
Brush::Util::r
static Rnd & r
Definition
rnd.h:176
Brush
< nsga2 selection operator for getting the front
Definition
bandit.cpp:3
src
bandit
dummy.cpp
Generated by
1.17.0