baybe.simulation.simulate_transfer_learning

baybe.simulation.simulate_transfer_learning(campaign: Campaign, lookup: DataFrame, /, *, batch_size: int = 1, n_doe_iterations: int | None = None, groupby: list[str] | None = None, n_mc_iterations: int = 1)[source]

Simulate Bayesian optimization with transfer learning.

A wrapper around baybe.simulation.simulate_scenarios() that partitions the search space into its tasks and simulates each task with the training data from the remaining tasks.

NOTE: Currently, the simulation only supports purely discrete search spaces. This is because lookup serves both as the loop-closing element and as the source for off-task training data. For continuous (or mixed) spaces, the lookup mechanism would need to be either implemented as a callable (in which case the training data must be provided separately) or the continuous parameters need to be effectively restricted to the finite number of provided lookup configurations. Neither is implemented at the moment.

Parameters:
Return type:

DataFrame

Returns:

A dataframe as returned by baybe.simulation.simulate_scenarios() where the different tasks are represented in the Scenario column.

Raises:

NotImplementedError – If a non-discrete search space is chosen.