SHADE 1.1
SHADE 1.1 (Differential evolution random locations)
- class DETAlgs.shade_1_1.SHADE_1_1(params: Shade_1_1_Data, db_conn=None, db_auto_write=False)[source]
Bases:
BaseAlgSHADE 1.1: Success-History based Adaptive Differential Evolution
Links: https://ieeexplore.ieee.org/document/6557555
References: Tanabe, R., & Fukunaga, A. (2013). Success-history based parameter adaptation for Differential Evolution. In 2013 IEEE Congress on Evolutionary Computation (pp. 71–78). 2013 IEEE Congress on Evolutionary Computation (CEC). IEEE. https://doi.org/10.1109/cec.2013.6557555
- initialize_parameters_for_epoch()[source]
Initialize the parameters for the next epoch of the SHADE algorithm. f_table: List of scaling factors for mutation. cr_table: List of crossover rates. the_bests_to_select: List of the number of the best members to select because in crossover we need to select the best members from the population for one factor.
Returns: - f_table (List[float]): List of scaling factors for mutation. - cr_table (List[float]): List of crossover rates. - the_bests_to_select (List[int]): List of the number of the best members to possibly select.
- mutate(population: Population, the_best_to_select_table: List[int], f_table: List[float]) Population[source]
Perform mutation step for the population in SHADE.
Parameters: - population (Population): The population to mutate. - the_best_to_select_table (List[int]): List of the number of the best members to select. - f_table (List[float]): List of scaling factors for mutation.
Returns: A new Population with mutated members.
- property nfe: int
Number of function evaluations performed so far.
- run()
- selection(origin_population: Population, modified_population: Population, ftable: List[float], cr_table: List[float])[source]
Perform selection operation for the population.
Parameters: - origin_population (Population): The original population. - modified_population (Population): The modified population - ftable (List[float]): List of scaling factors for mutation. - cr_table (List[float]): List of crossover rates.
Returns: A new population with the selected members.
- update_memory(success_f: List[float], success_cr: List[float], difference_fitness_success: List[float])[source]
Update the memory for the crossover rates and scaling factors based on the success of the trial vectors.
Parameters: - success_f (List[float]): List of scaling factors that led to better trial vectors. - success_cr (List[float]): List of crossover rates that led to better trial vectors. - difference_fitness_success (List[float]): List of differences in objective function values (|f(u_k, G) - f(x_k, G)|).
- write_results_to_database(results_data)
- class detpy.DETAlgs.data.alg_data.Shade_1_1_Data(population_size: int = 100, max_nfe: int = 100000, dimension: int = 10, additional_stop_criteria: detpy.models.stop_condition.stop_condition.StopCondition = <detpy.models.stop_condition.never_stop_condition.NeverStopCondition object at 0x7f136577ee40>, lb: list = <factory>, ub: list = <factory>, optimization_type: detpy.models.enums.optimization.OptimizationType = <OptimizationType.MINIMIZATION: 'minimization'>, boundary_constraints_fun: detpy.models.enums.boundary_constrain.BoundaryFixing = <BoundaryFixing.RANDOM: 'random'>, function: detpy.models.fitness_function.FitnessFunctionBase = None, log_population: bool = False, parallel_processing: Optional[list] = None, show_plots: bool = True, memory_size: int = 5, best_member_percentage: float = 0.2)[source]
Bases:
BaseData- additional_stop_criteria: StopCondition = <detpy.models.stop_condition.never_stop_condition.NeverStopCondition object>
- best_member_percentage: float = 0.2
- boundary_constraints_fun: BoundaryFixing = 'random'
- dimension: int = 10
- function: FitnessFunctionBase = None
- lb: list
- log_population: bool = False
- max_nfe: int = 100000
- memory_size: int = 5
- optimization_type: OptimizationType = 'minimization'
- parallel_processing: list | None = None
- population_size: int = 100
- show_plots: bool = True
- ub: list