Brush C++ API
A flexible interpretable machine learning framework
|
#include <dummy.h>
Public Member Functions | |
DummyBandit (vector< T > arms) | |
DummyBandit (map< T, float > arms_probs) | |
~DummyBandit () | |
std::map< T, float > | sample_probs (bool update) |
Samples the probabilities of the arms. | |
T | choose (const VectorXf &context) |
Chooses an arm based on the given tree and fitness. Should call sample_probs internally. | |
void | update (T arm, float reward, VectorXf &context) |
Updates the reward for a specific arm. | |
![]() | |
BanditOperator (vector< T > arms) | |
Constructs a BanditOperator object with a vector of arms. | |
BanditOperator (map< T, float > arms_probs) | |
Constructs a BanditOperator object with a map of arms and their probabilities. | |
~BanditOperator () | |
Additional Inherited Members | |
![]() | |
std::map< T, float > | probabilities |
|
inline |
|
inline |
|
inline |
|
virtual |
Chooses an arm based on the given tree and fitness. Should call sample_probs internally.
tree | The tree structure used to choose the arm. |
f | The fitness value used to influence the choice. |
Reimplemented from Brush::MAB::BanditOperator< T >.
|
virtual |
Samples the probabilities of the arms.
update | A boolean indicating whether to update the probabilities. |
Reimplemented from Brush::MAB::BanditOperator< T >.
Definition at line 7 of file dummy.cpp.
|
virtual |
Updates the reward for a specific arm.
arm | The arm for which to update the reward. |
reward | The reward value. |
Reimplemented from Brush::MAB::BanditOperator< T >.
Definition at line 19 of file dummy.cpp.