Scale
- class coba.environments.Scale
Scale and shift features.
Constructors
- __init__(shift: Number | Literal['min', 'mean', 'median'] = 0, scale: Number | Literal['minmax', 'std', 'iqr', 'maxabs'] = 'minmax', target: Literal['context'] = 'context', using: int | None = None)
Instantiate a Scale filter.
- Parameters:
shift – The statistic to use to shift each context feature.
scale – The statistic to use to scale each context feature.
target – The target data we wish to scale in the environment.
using – The number of interactions to use when calculating the necessary statistics.
Methods
- filter(interactions: Iterable[Interaction]) Iterable[Interaction]
Apply filter to an Environment’s interactions.
Attributes
- params