smac.runhistory.runhistory2epm module

class smac.runhistory.runhistory2epm.AbstractRunHistory2EPM(scenario: smac.scenario.scenario.Scenario, num_params: int, success_states: typing.List[smac.tae.execute_ta_run.StatusType] = None, impute_censored_data: bool = False, impute_state: typing.List[smac.tae.execute_ta_run.StatusType] = None, imputor: smac.epm.base_imputor.BaseImputor = None, rng: mtrand.RandomState = None)[source]

Bases: object

Constructor

Parameters:
  • scenario (Scenario Object) – Algorithm Configuration Scenario
  • num_params (int) – number of parameters in config space
  • success_states (list, optional) – List of states considered as successful (such as StatusType.SUCCESS) If None, set to [StatusType.SUCCESS, ]
  • impute_censored_data (bool, optional) – Should we impute data?
  • imputor (epm.base_imputor Instance) – Object to impute censored data
  • impute_state (list, optional) – List of states that mark censored data (such as StatusType.TIMEOUT) in combination with runtime < cutoff_time If None, set to [StatusType.CAPPED, ]
  • rng (numpy.random.RandomState) – only used for reshuffling data after imputation
get_X_y(runhistory: smac.runhistory.runhistory.RunHistory)[source]

Simple interface to obtain all data in runhistory in X, y format

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – runhistory of all evaluated configurations x instances
Returns:
  • X (numpy.ndarray) – matrix of all configurations (+ instance features)
  • y (numpy.ndarray) – vector of cost values; can include censored runs
  • cen (numpy.ndarray) – vector of bools indicating whether the y-value is censored
transform(runhistory: smac.runhistory.runhistory.RunHistory)[source]

Returns vector representation of runhistory; if imputation is disabled, censored (TIMEOUT with time < cutoff) will be skipped

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – Runhistory containing all evaluated configurations/instances
Returns:
  • X (numpy.ndarray) – configuration vector x instance features
  • Y (numpy.ndarray) – cost values
class smac.runhistory.runhistory2epm.RunHistory2EPM4Cost(scenario: smac.scenario.scenario.Scenario, num_params: int, success_states: typing.List[smac.tae.execute_ta_run.StatusType] = None, impute_censored_data: bool = False, impute_state: typing.List[smac.tae.execute_ta_run.StatusType] = None, imputor: smac.epm.base_imputor.BaseImputor = None, rng: mtrand.RandomState = None)[source]

Bases: smac.runhistory.runhistory2epm.AbstractRunHistory2EPM

TODO

Constructor

Parameters:
  • scenario (Scenario Object) – Algorithm Configuration Scenario
  • num_params (int) – number of parameters in config space
  • success_states (list, optional) – List of states considered as successful (such as StatusType.SUCCESS) If None, set to [StatusType.SUCCESS, ]
  • impute_censored_data (bool, optional) – Should we impute data?
  • imputor (epm.base_imputor Instance) – Object to impute censored data
  • impute_state (list, optional) – List of states that mark censored data (such as StatusType.TIMEOUT) in combination with runtime < cutoff_time If None, set to [StatusType.CAPPED, ]
  • rng (numpy.random.RandomState) – only used for reshuffling data after imputation
get_X_y(runhistory: smac.runhistory.runhistory.RunHistory)

Simple interface to obtain all data in runhistory in X, y format

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – runhistory of all evaluated configurations x instances
Returns:
  • X (numpy.ndarray) – matrix of all configurations (+ instance features)
  • y (numpy.ndarray) – vector of cost values; can include censored runs
  • cen (numpy.ndarray) – vector of bools indicating whether the y-value is censored
transform(runhistory: smac.runhistory.runhistory.RunHistory)

Returns vector representation of runhistory; if imputation is disabled, censored (TIMEOUT with time < cutoff) will be skipped

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – Runhistory containing all evaluated configurations/instances
Returns:
  • X (numpy.ndarray) – configuration vector x instance features
  • Y (numpy.ndarray) – cost values
class smac.runhistory.runhistory2epm.RunHistory2EPM4EIPS(scenario: smac.scenario.scenario.Scenario, num_params: int, success_states: typing.List[smac.tae.execute_ta_run.StatusType] = None, impute_censored_data: bool = False, impute_state: typing.List[smac.tae.execute_ta_run.StatusType] = None, imputor: smac.epm.base_imputor.BaseImputor = None, rng: mtrand.RandomState = None)[source]

Bases: smac.runhistory.runhistory2epm.AbstractRunHistory2EPM

TODO

Constructor

Parameters:
  • scenario (Scenario Object) – Algorithm Configuration Scenario
  • num_params (int) – number of parameters in config space
  • success_states (list, optional) – List of states considered as successful (such as StatusType.SUCCESS) If None, set to [StatusType.SUCCESS, ]
  • impute_censored_data (bool, optional) – Should we impute data?
  • imputor (epm.base_imputor Instance) – Object to impute censored data
  • impute_state (list, optional) – List of states that mark censored data (such as StatusType.TIMEOUT) in combination with runtime < cutoff_time If None, set to [StatusType.CAPPED, ]
  • rng (numpy.random.RandomState) – only used for reshuffling data after imputation
get_X_y(runhistory: smac.runhistory.runhistory.RunHistory)

Simple interface to obtain all data in runhistory in X, y format

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – runhistory of all evaluated configurations x instances
Returns:
  • X (numpy.ndarray) – matrix of all configurations (+ instance features)
  • y (numpy.ndarray) – vector of cost values; can include censored runs
  • cen (numpy.ndarray) – vector of bools indicating whether the y-value is censored
transform(runhistory: smac.runhistory.runhistory.RunHistory)

Returns vector representation of runhistory; if imputation is disabled, censored (TIMEOUT with time < cutoff) will be skipped

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – Runhistory containing all evaluated configurations/instances
Returns:
  • X (numpy.ndarray) – configuration vector x instance features
  • Y (numpy.ndarray) – cost values
class smac.runhistory.runhistory2epm.RunHistory2EPM4LogCost(scenario: smac.scenario.scenario.Scenario, num_params: int, success_states: typing.List[smac.tae.execute_ta_run.StatusType] = None, impute_censored_data: bool = False, impute_state: typing.List[smac.tae.execute_ta_run.StatusType] = None, imputor: smac.epm.base_imputor.BaseImputor = None, rng: mtrand.RandomState = None)[source]

Bases: smac.runhistory.runhistory2epm.RunHistory2EPM4Cost

TODO

Constructor

Parameters:
  • scenario (Scenario Object) – Algorithm Configuration Scenario
  • num_params (int) – number of parameters in config space
  • success_states (list, optional) – List of states considered as successful (such as StatusType.SUCCESS) If None, set to [StatusType.SUCCESS, ]
  • impute_censored_data (bool, optional) – Should we impute data?
  • imputor (epm.base_imputor Instance) – Object to impute censored data
  • impute_state (list, optional) – List of states that mark censored data (such as StatusType.TIMEOUT) in combination with runtime < cutoff_time If None, set to [StatusType.CAPPED, ]
  • rng (numpy.random.RandomState) – only used for reshuffling data after imputation
get_X_y(runhistory: smac.runhistory.runhistory.RunHistory)

Simple interface to obtain all data in runhistory in X, y format

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – runhistory of all evaluated configurations x instances
Returns:
  • X (numpy.ndarray) – matrix of all configurations (+ instance features)
  • y (numpy.ndarray) – vector of cost values; can include censored runs
  • cen (numpy.ndarray) – vector of bools indicating whether the y-value is censored
transform(runhistory: smac.runhistory.runhistory.RunHistory)

Returns vector representation of runhistory; if imputation is disabled, censored (TIMEOUT with time < cutoff) will be skipped

Parameters:runhistory (smac.runhistory.runhistory.RunHistory) – Runhistory containing all evaluated configurations/instances
Returns:
  • X (numpy.ndarray) – configuration vector x instance features
  • Y (numpy.ndarray) – cost values