Shared types
Shared public types for PyMAB.
- class PolicyCapabilities[source]
Bases:
objectStatic compatibility information for a policy implementation.
- reward_domains: frozenset[RewardDomain]
- objective: PolicyObjective = 'cumulative_reward'
- __init__(contextual, reward_domains, objective=PolicyObjective.CUMULATIVE_REWARD)
- Parameters:
contextual (bool)
reward_domains (frozenset[RewardDomain])
objective (PolicyObjective)
- Return type:
None
- class PolicyObjective[source]
Bases:
EnumPrimary objective optimized by a policy.
- CUMULATIVE_REWARD = 'cumulative_reward'
- BEST_ARM = 'best_arm'
- classmethod __contains__(value)
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)
Return the member matching name.
- classmethod __iter__()
Return members in definition order.
- classmethod __len__()
Return the number of members (no aliases)
- class RewardDomain[source]
Bases:
EnumMathematical support required by an environment or policy.
- REAL = 'real'
- UNIT_INTERVAL = 'unit_interval'
- BINARY = 'binary'
- classmethod __contains__(value)
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)
Return the member matching name.
- classmethod __iter__()
Return members in definition order.
- classmethod __len__()
Return the number of members (no aliases)