classes.optimizers package¶
Submodules¶
classes.optimizers.constraint_based_optimizer module¶
-
class
classes.optimizers.constraint_based_optimizer.
ConstraintBasedOptimizer
(node_id: str, structure_estimator: classes.estimators.structure_estimator.StructureEstimator, tot_vars_count: int)¶ Bases:
classes.optimizers.optimizer.Optimizer
Optimizer class that implement a CTPC Algorithm
- Parameters
node_id (string) – current node’s id
structure_estimator (class:'StructureEstimator') – a structure estimator object with the information about the net
tot_vars_count (int) – number of variables in the dataset
-
optimize_structure
()¶ Compute Optimization process for a structure_estimator by using a CTPC Algorithm
- Returns
the estimated structure for the node
- Return type
List
classes.optimizers.hill_climbing_search module¶
-
class
classes.optimizers.hill_climbing_search.
HillClimbing
(node_id: str, structure_estimator: classes.estimators.structure_estimator.StructureEstimator, max_parents: int = None, iterations_number: int = 40, patience: int = None)¶ Bases:
classes.optimizers.optimizer.Optimizer
Optimizer class that implement Hill Climbing Search
- Parameters
node_id (string) – current node’s id
structure_estimator (class:'StructureEstimator') – a structure estimator object with the information about the net
max_parents (int, optional) – maximum number of parents for each variable. If None, disabled, default to None
iterations_number (int, optional) – maximum number of optimization algorithm’s iteration, default to 40
patience (int, optional) – number of iteration without any improvement before to stop the search.If None, disabled, default to None
-
optimize_structure
() → List¶ Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm
- Returns
the estimated structure for the node
- Return type
List
classes.optimizers.optimizer module¶
-
class
classes.optimizers.optimizer.
Optimizer
(node_id: str, structure_estimator: classes.estimators.structure_estimator.StructureEstimator)¶ Bases:
abc.ABC
Interface class for all the optimizer’s child classes
- Parameters
node_id (string) – the node label
structure_estimator (class:'StructureEstimator') – A structureEstimator Object to predict the structure
-
abstract
optimize_structure
() → List¶ Compute Optimization process for a structure_estimator
- Returns
the estimated structure for the node
- Return type
List
classes.optimizers.tabu_search module¶
-
class
classes.optimizers.tabu_search.
TabuSearch
(node_id: str, structure_estimator: classes.estimators.structure_estimator.StructureEstimator, max_parents: int = None, iterations_number: int = 40, patience: int = None, tabu_length: int = None, tabu_rules_duration=None)¶ Bases:
classes.optimizers.optimizer.Optimizer
Optimizer class that implement Tabu Search
- Parameters
node_id (string) – current node’s id
structure_estimator (class:'StructureEstimator') – a structure estimator object with the information about the net
max_parents (int, optional) – maximum number of parents for each variable. If None, disabled, default to None
iterations_number (int, optional) – maximum number of optimization algorithm’s iteration, default to 40
patience (int, optional) – number of iteration without any improvement before to stop the search.If None, disabled, default to None
tabu_length (int, optional) – maximum lenght of the data structures used in the optimization process, default to None
tabu_rules_duration (int, optional) – number of iterations in which each rule keeps its value, default to None
-
optimize_structure
() → List¶ Compute Optimization process for a structure_estimator by using a Hill Climbing Algorithm
- Returns
the estimated structure for the node
- Return type
List