coba.environments

Environment creators and modifiers.

Friendly API

Environments

A friendly API for common environment functionality.

Sources

CsvSource

Load a csv dataset.

ArffSource

Load an arff dataset.

LibSvmSource

Load a libsvm dataset.

ManikSource

Load a manik dataset.

OpenmlSource

Load an openml.org dataset.

Simulations

LambdaSimulation

A contextual bandit environment created from generative lambda functions.

SupervisedSimulation

A contextual bandit environment created from supervised data.

OpenmlSimulation

A supervised simulation created from an openml dataset.

LinearSyntheticSimulation

A synthetic simulation whose rewards are linear with respect to the given reward features.

NeighborsSyntheticSimulation

A synthetic simulation whose reward values are determined by neighborhoods.

KernelSyntheticSimulation

A synthetic simulation whose reward function is created from kernel basis functions.

MLPSyntheticSimulation

A synthetic simulation whose reward function belongs to the MLP family.

Filters

Batch

Batch interactions.

BatchSafe

Make a filter agnostic to batching.

Binary

Transform reward values to 1 or 0.

Cache

Cache given interactions.

Chunk

Indicate where to chunk.

Cycle

Cycle reward values.

Densify

Ensure that features are dense.

Finalize

Final preparation for built-in Evaluators.

Flatten

Flatten contexts and actions.

Grounded

Transform simulated interactions to IGL interactions.

Impute

Impute missing values (nan) in Interaction contexts.

Logged

Transform simulated interactions to logged interactions.

Noise

Add noise to values.

OpeRewards

Transform logged interactions to simulated interactions.

Repr

Change representation of categorical data.

Reservoir

Take n random interactions.

Riffle

Riffle shuffle interactions.

Scale

Scale and shift features.

Shuffle

Shuffle interaction order.

Slice

Take a slice of interactions.

Sort

Sort interactions by features.

Sparsify

Ensure that features are sparse.

Take

Take the first n interactions.

Unbatch

Unbatch interactions.

Where

Select for characteristics