smac.utils.merge_foreign_data module

smac.utils.merge_foreign_data.merge_foreign_data(scenario: smac.scenario.scenario.Scenario, runhistory: smac.runhistory.runhistory.RunHistory, in_scenario_list: typing.List[smac.scenario.scenario.Scenario], in_runhistory_list: typing.List[smac.runhistory.runhistory.RunHistory])[source]

Extend <scenario> and <runhistory> with runhistory data from another <in_scenario> assuming the same pcs, feature space, but different instances

Parameters:
  • scenario (Scenario) – original scenario – feature dictionary will be extended
  • runhistory (RunHistory) – original runhistory – will be extended by further data points
  • in_scenario_list (typing.List[Scenario]) – input scenario
  • in_runhistory_list (typing.List[RunHistory]) – list of runhistories wrt <in_scenario>
Returns:

  • scenario (Scenario)
  • runhistory (Runhistory)

smac.utils.merge_foreign_data.merge_foreign_data_from_file(scenario: smac.scenario.scenario.Scenario, runhistory: smac.runhistory.runhistory.RunHistory, in_scenario_fn_list: typing.List[str], in_runhistory_fn_list: typing.List[str], cs: ConfigSpace.configuration_space.ConfigurationSpace, aggregate_func: typing.Callable = <function average_cost>)[source]

Extend <scenario> and <runhistory> with runhistory data from another <in_scenario> assuming the same pcs, feature space, but different instances

Parameters:
  • scenario (Scenario) – original scenario – feature dictionary will be extended
  • runhistory (RunHistory) – original runhistory – will be extended by further data points
  • in_scenario_fn_list (typing.List[str]) – input scenario file names
  • in_runhistory_fn_list (typing.List[str]) – list filenames of runhistory dumps
  • cs (ConfigurationSpace) – parameter configuration space to read runhistory from file
  • aggregate_func (typing.Callable) – function to aggregate performance of a configuratoion across instances
Returns:

  • scenario (Scenario)
  • runhistory (Runhistory)