Skip to content

Commit

Permalink
CR Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahar-Bar committed Jul 30, 2024
1 parent 09845ce commit 97d46f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pybandits/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def __init__(self, **data: Any) -> None:
@validate_arguments
def _make_epsilon_greedy(epsilon: Float01, default_action: Optional[ActionId], select_action: Callable):
"""
Wraps a select_action function with epsilon-greedy strategy.
Wraps a select_action function with epsilon-greedy strategy, such that with probability epsilon a default_action
is selected, and with probability 1-epsilon the select_action function is triggered to choose action.
If no default_action is provided, a random action is selected.
Parameters
----------
Expand All @@ -102,6 +104,11 @@ def _make_epsilon_greedy(epsilon: Float01, default_action: Optional[ActionId], s
-------
select_epsilon_greedy_action: Callable
The wrapped function.
Raises
------
KeyError
If default_action is not present as a key in the probabilities dictionary.
"""

def select_epsilon_greedy_action(
Expand Down

0 comments on commit 97d46f9

Please sign in to comment.