Covariance Matrix Adaption Evolutionary Strategy analysis¶
-
CMAES_Analysis.
CMAES_iterate
(iterations=5, population_size=30, constraint=False, constraint_levers=[], constraint_values=[], output_constraint=False, output_constraint_names=[], output_constraints=[], threshold=False, threshold_names=[], thresholds=[], std_devs=[])¶ Given a set of constraints performs CMA-ES iteration(s) on the Global Calculator.
Args:
iterations (int): Number of CMA-ES iterations.
population_size (int): Number of chromosomes per iteration.
constraint (boolean): Flag to decide whether to fix input levers or not.
constraint_levers (list of strings): Contains the names of the levers to be fixed.
constraint_Values (list of floats): Contains the values of the levers to be fixed.
output_constraint (boolean): Flag to decide whether to fix outputs or not.
output_constraint_names (list of strings): Contains the names of the output to be fixed.
output_constraints (list of floats): Contains the values of the output to be fixed.
threshold (boolean): Flag to decide whether to bound levers within a range or not.
threshold_names (list of strings): Contains the names of the levers to be bounded within a range.
thresholds (list of list of floats): Contains the upper and lower threshold to bound the specified levers.
Returns: Total fitness value of each generation and lever values of all the chromosomes from the last generation.
-
CMAES_Analysis.
generate_chromosome
(constraint=False, constraint_levers=[], constraint_values=[], threshold=False, threshold_names=[], thresholds=[])¶ Initialises a chromosome and returns its corresponding lever values, and temperature and cost.
Args:
constraint (boolean): Flag to select whether any inputs have been fixed.
constraint_levers (list of strings): Contains the name of levers to be fixed.
constraint_values (list of floats): Contains the values to fix the selected levers to.
threshold (boolean): Flag to select whether any inputs have to be bounded within a range.
threshold_names (list of strings): Contains the name of the levers to be bounded within a range.
thresholds (list of lists of floats): Contains the upper and lower bound for each specified lever.
Returns: Lever values corresponding to generated chromosome and cost values corresponding to the current chromosome.
-
CMAES_Analysis.
lever_step
(lever_value, thresholds=[1, 3.9], threshold=False, threshold_name='', threshold_value='', p=[0.5, 0.5, 0, 0, 0, 0])¶ Mutate gene by randomly moving a lever up or down by 0.1. Returns the mutated gene (the new lever value)
-
CMAES_Analysis.
mate
(parent_1, parent_2, threshold=False, threshold_name='', threshold_value='')¶ Takes a couple of parents, performs crossover, and returns resulting child.