Description Usage Arguments Parameters Methods See Also
Policy: ContextualEpsilonGreedyPolicy with unique linear models
1 | policy <- ContextualEpsilonGreedyPolicy(epsilon = 0.1)
|
epsilondouble, a positive real value R+
Ad*d identity matrix
ba zero vector of length d
new(epsilon = 0.1) Generates a new ContextualEpsilonGreedyPolicy object.
Arguments are defined in the Argument section above.
set_parameters()each policy needs to assign the parameters it wants to keep track of
to list self$theta_to_arms that has to be defined in set_parameters()'s body.
The parameters defined here can later be accessed by arm index in the following way:
theta[[index_of_arm]]$parameter_name
get_action(context)here, a policy decides which arm to choose, based on the current values of its parameters and, potentially, the current context.
set_reward(reward, context)in set_reward(reward, context), a policy updates its parameter values
based on the reward received, and, potentially, the current context.
Core contextual classes: Bandit, Policy, Simulator,
Agent, History, Plot
Bandit subclass examples: BasicBernoulliBandit, ContextualLogitBandit,
OfflineReplayEvaluatorBandit
Policy subclass examples: EpsilonGreedyPolicy, ContextualLinTSPolicy
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.