csle_agents.agents.bayesian_optimization_emukit.bo package
Subpackages
Submodules
csle_agents.agents.bayesian_optimization_emukit.bo.bo_config module
- class csle_agents.agents.bayesian_optimization_emukit.bo.bo_config.BOConfig(X_init: numpy.ndarray[Any, numpy.dtype[Any]], Y_init: numpy.ndarray[Any, numpy.dtype[Any]], input_space: emukit.core.parameter_space.ParameterSpace, evaluation_budget: int, gp_config: csle_agents.agents.bayesian_optimization_emukit.bo.gp.gp_config.GPConfig, acquisition_function_type: csle_agents.agents.bayesian_optimization_emukit.bo.acquisition.acquisition_function_type.AcquisitionFunctionType, acquisition_optimizer_type: csle_agents.agents.bayesian_optimization_emukit.bo.acquisition.acquisition_optimizer_type.AcquisitionOptimizerType, objective_type: csle_agents.common.objective_type.ObjectiveType, beta: float = 1)[source]
Bases:
object
DTO representing the configuration of a Bayesian Optimization execution
- static from_dict(d: Dict[str, Any]) csle_agents.agents.bayesian_optimization_emukit.bo.bo_config.BOConfig [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) csle_agents.agents.bayesian_optimization_emukit.bo.bo_config.BOConfig [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
- get_acquisition_function(surrogate_model: emukit.model_wrappers.gpy_model_wrappers.GPyModelWrapper) emukit.core.acquisition.acquisition.Acquisition [source]
Gets the acquisition function for the configuration
- Parameters
surrogate_model – the surrogate model to use for the acquisition
- Returns
the acquisition function (from the emukit library)
csle_agents.agents.bayesian_optimization_emukit.bo.bo_results module
- class csle_agents.agents.bayesian_optimization_emukit.bo.bo_results.BOResults(remaining_budget: float)[source]
Bases:
object
DTO representing the state and results of an execution of Bayesian Optimization
- copy() csle_agents.agents.bayesian_optimization_emukit.bo.bo_results.BOResults [source]
- Returns
a copy of the DTO
- static from_dict(d: Dict[str, Any]) csle_agents.agents.bayesian_optimization_emukit.bo.bo_results.BOResults [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) csle_agents.agents.bayesian_optimization_emukit.bo.bo_results.BOResults [source]
Reads a json file and converts it into a dto
- Parameters
json_file_path – the json file path to load the DTO from
- Returns
the loaded DTO
- static from_json_str(json_str: str) csle_agents.agents.bayesian_optimization_emukit.bo.bo_results.BOResults [source]
Converts json string into a DTO
- Parameters
json_str – the json string representation
- Returns
the DTO instance