|
Brush C++ API
A flexible interpretable machine learning framework
|
#include <thompson.h>


Public Member Functions | |
| ThompsonSamplingBandit (vector< string > arms, bool dynamic=false) | |
| ThompsonSamplingBandit (map< string, float > arms_probs, bool dynamic=false) | |
| ~ThompsonSamplingBandit () | |
| std::map< string, float > | sample_probs (bool update) |
| Samples the probabilities of the arms. | |
| string | choose () |
| Chooses an arm based on the given tree and fitness. Should call sample_probs internally. | |
| void | update (string arm, float reward) |
| Updates the reward for a specific arm. | |
| Public Member Functions inherited from Brush::MAB::BanditOperator | |
| BanditOperator (vector< string > arms) | |
| Constructs a BanditOperator object with a vector of arms. | |
| BanditOperator (map< string, float > arms_probs) | |
| Constructs a BanditOperator object with a map of arms and their probabilities. | |
| ~BanditOperator () | |
Private Attributes | |
| bool | dynamic_update |
| float | C = 250 |
| std::map< string, float > | alphas |
| std::map< string, float > | betas |
Additional Inherited Members | |
| Protected Attributes inherited from Brush::MAB::BanditOperator | |
| std::map< string, float > | probabilities |
Definition at line 11 of file thompson.h.
|
inline |
Definition at line 16 of file thompson.h.
|
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.
Definition at line 54 of file thompson.cpp.

|
virtual |
Samples the probabilities of the arms.
| update | A boolean indicating whether to update the probabilities. |
Reimplemented from Brush::MAB::BanditOperator.
Definition at line 27 of file thompson.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.
Definition at line 60 of file thompson.cpp.

|
private |
Definition at line 25 of file thompson.h.
|
private |
Definition at line 26 of file thompson.h.
|
private |
Definition at line 23 of file thompson.h.
|
private |
Definition at line 22 of file thompson.h.