ETIA.CausalLearning.CDHPO package

Subpackages

Submodules

ETIA.CausalLearning.CDHPO.CDHPOBase module

class CDHPOBase(configurations, dataset)[source]

Bases: object

A base class for Causal Discovery Hyperparameter Optimization (CDHPO) algorithms. This class defines the basic structure for implementing hyperparameter optimization algorithms.

run()[source]

Runs the hyperparameter optimization process. This method should be overridden by subclasses.

run_new()[source]

Re-runs the optimization process with new or updated configurations. This method should be overridden by subclasses.

find_best_config(algorithms)[source]

Finds the best configuration from a list of algorithms. This method should be overridden by subclasses.

save_progress(path)[source]

Saves the current progress of the optimization process.

load_progress(path)[source]

Loads the progress of a previously run optimization from the specified path.

run()[source]

Runs the hyperparameter optimization process. This method should be overridden by subclasses to provide the specific optimization algorithm.

Returns:

The optimal configuration after the hyperparameter optimization process.

Return type:

object

run_new()[source]

Re-runs the optimization process, typically with new or updated configurations. This method should be overridden by subclasses to define the behavior for restarting or continuing optimization.

find_best_config(algorithms)[source]

Finds the best configuration among the given algorithms.

Parameters:

algorithms (list) – A list of algorithms to evaluate and choose the best configuration from.

Returns:

The best configuration determined from the list of algorithms.

Return type:

object

save_progress(path)[source]

Saves the progress of the optimization process to a file.

Parameters:

path (str) – The file path where the progress should be saved.

load_progress(path)[source]

Loads the progress of a previously run optimization from a file.

Parameters:

path (str) – The file path from where the progress should be loaded.