LinearSyntheticSimulation
- class coba.environments.LinearSyntheticSimulation
A synthetic simulation whose rewards are linear with respect to the given reward features.
The simulation’s rewards are linear with respect to the requrested reward features. When no context or action features are requested these terms are removed from the requested reward features.
Constructors
- __init__(n_interactions: int, n_actions: int = 10, n_context_features: int = 10, n_action_features: int = 10, n_coefficients: int | None = 5, reward_features: Sequence[str] = ['a', 'xa'], seed: int = 1) None
Instantiate a LinearSyntheticSimulation.
- 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.
function. (n_coefficients The number of non-zero weights in the final reward) –
reward_features – The features in the simulation’s linear reward function.
seed – The random number seed used to generate all features, weights and noise in the simulation.
Methods
- read() Iterable[SimulatedInteraction]
A sequence of interactions.
- Remarks:
This function should always be “re-iterable”.
Attributes
- params