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