NeighborsSyntheticSimulation
- class coba.environments.NeighborsSyntheticSimulation
A synthetic simulation whose reward values are determined by neighborhoods.
The simulation’s rewards are determined by the location of given context and action pairs. These locations indicate which neighborhood the context action pair belongs to. Neighborhood rewards are determined by random assignment.
Constructors
- __init__(n_interactions: int, n_actions: int = 10, n_context_features: int = 10, n_action_features: int = 10, n_neighborhoods: int = 10, seed: int = 1) None
Instantiate a NeighborsSyntheticSimulation.
- Parameters:
n_interactions – The number of interactions the simulation should have.
n_actions – The number of actions each interaction should have.
n_context_features – The number of features each context should have.
n_action_features – The number of features each action should have.
n_neighborhoods – The number of neighborhoods the simulation should have.
seed – The random number seed used to generate all contexts and action rewards.
Methods
- read() Iterable[SimulatedInteraction]
A sequence of interactions.
- Remarks:
This function should always be “re-iterable”.
Attributes
- params