baybe.simulation.scenarios.simulate_scenarios¶
- baybe.simulation.scenarios.simulate_scenarios(scenarios: dict[Any, Campaign], lookup: DataFrame | Callable | None = None, /, *, batch_size: int = 1, n_doe_iterations: int | None = None, initial_data: list[DataFrame] | None = None, groupby: list[str] | None = None, n_mc_iterations: int = 1, random_seed: int | None = None, impute_mode: Literal['error', 'worst', 'best', 'mean', 'random', 'ignore'] = 'error', noise_percent: float | None = None)[source]¶
Simulate multiple Bayesian optimization scenarios.
A wrapper function around
baybe.simulation.core.simulate_experiment()
that allows to specify multiple simulation settings at once.- Parameters:
scenarios (
dict
[Any
,Campaign
]) – A dictionary mapping scenario identifiers to DOE specifications.lookup (
Union
[DataFrame
,Callable
,None
]) – Seebaybe.simulation.core.simulate_experiment()
.batch_size (
int
) – Seebaybe.simulation.core.simulate_experiment()
.n_doe_iterations (
Optional
[int
]) – Seebaybe.simulation.core.simulate_experiment()
.initial_data (
Optional
[list
[DataFrame
]]) – A list of initial data sets for which the scenarios should be simulated.groupby (
Optional
[list
[str
]]) – The names of the parameters to be used to partition the search space. A separate simulation will be conducted for each partition, with the search restricted to that partition.n_mc_iterations (
int
) – The number of Monte Carlo simulations to be used.random_seed (
Optional
[int
]) – An optional integer specifying the random seed for the first Monte Carlo run. Each subsequent runs will increase this value by 1. If omitted, the current random seed is used.impute_mode (
Literal
['error'
,'worst'
,'best'
,'mean'
,'random'
,'ignore'
]) – Seebaybe.simulation.core.simulate_experiment()
.noise_percent (
Optional
[float
]) – Seebaybe.simulation.core.simulate_experiment()
.
- Return type:
- Returns:
A dataframe like returned from
baybe.simulation.core.simulate_experiment()
but with additional columns. See theNote
for details.
Note
The following additional columns are contained in the dataframe returned by this function:
Scenario
: Specifies the scenario identifier of the respective simulation.Monte_Carlo_Run
: Specifies the Monte Carlo repetition of the respective simulation.Optional, if
random_seed
is provided: A columnRandom_Seed
that specifies the random seed used for the respective simulation.Optional, if
initial_data
is provided: A columnInitial_Data
that specifies the index of the initial data set used for the respective simulation.Optional, if
groupby
is provided: A column for eachgroupby
parameter that specifies the search space partition considered for the respective simulation.