banditpylib
¶
Submodules¶
banditpylib.arms
banditpylib.bandits
banditpylib.learners
- Submodules
- Classes
banditpylib.protocols
Functions¶
argmax_or_min()
: Find index with the largest or smallest valueargmax_or_min_tuple()
: Find the second element of the tuple with the largest or smallest valueparse_trials_from_bytes()
: Parse trials from bytestrials_to_dataframe()
: Read bytes file storing trials and transform to pandas DataFrame
- banditpylib.argmax_or_min(values: List[float], find_min: bool = False) → int[source]¶
Find index with the largest or smallest value
- Parameters
values – a list of values
find_min – whether to select smallest value
- Returns
index with the largest or smallest value. When there is a tie, randomly output one of the indexes.
- banditpylib.argmax_or_min_tuple(values: List[Tuple[float, int]], find_min: bool = False) → int[source]¶
Find the second element of the tuple with the largest or smallest value
- Parameters
values – a list of tuples
find_min – whether to select smallest value
- Returns
the second element of the tuple with the largest or smallest value. When there is a tie, randomly output one of them.