Policies.BaseWrapperPolicy module

Base class for any wrapper policy.

class Policies.BaseWrapperPolicy.BaseWrapperPolicy(nbArms, policy=<class 'Policies.UCB.UCB'>, *args, **kwargs)[source]

Bases: Policies.BasePolicy.BasePolicy

Base class for any wrapper policy.

__init__(nbArms, policy=<class 'Policies.UCB.UCB'>, *args, **kwargs)[source]

New policy.

startGame(createNewPolicy=True)[source]

Initialize the policy for a new game.

Warning

createNewPolicy=True creates a new object for the underlying policy, while createNewPolicy=False only call BasePolicy.startGame().

getReward(arm, reward)[source]

Pass the reward, as usual, update t and sometimes restart the underlying policy.

choice()[source]

Pass the call to choice of the underlying policy.

property index

Get attribute index from the underlying policy.

choiceWithRank(rank=1)[source]

Pass the call to choiceWithRank of the underlying policy.

choiceFromSubSet(availableArms='all')[source]

Pass the call to choiceFromSubSet of the underlying policy.

choiceMultiple(nb=1)[source]

Pass the call to choiceMultiple of the underlying policy.

choiceIMP(nb=1, startWithChoiceMultiple=True)[source]

Pass the call to choiceIMP of the underlying policy.

estimatedOrder()[source]

Pass the call to estimatedOrder of the underlying policy.

estimatedBestArms(M=1)[source]

Pass the call to estimatedBestArms of the underlying policy.

computeIndex(arm)[source]

Pass the call to computeIndex of the underlying policy.

computeAllIndex()[source]

Pass the call to computeAllIndex of the underlying policy.

__module__ = 'Policies.BaseWrapperPolicy'