LSHADE
LSHADE (Improving the Search Performance of SHADE Using Linear Population Size Reduction)
- class DETAlgs.lshade.LSHADE(params: LShadeData, db_conn=None, db_auto_write=False)[source]
Bases:
BaseAlgLSHADE: Improving the Search Performance of SHADE Using Linear Population Size Reduction
Links: https://ieeexplore.ieee.org/document/6900380
References: Tanabe, R., & Fukunaga, A. S. (2014). Improving the search performance of SHADE using linear population size reduction. In 2014 IEEE Congress on Evolutionary Computation (CEC) (pp. 1658–1665). 2014 IEEE Congress on Evolutionary Computation (CEC). IEEE. https://doi.org/10.1109/cec.2014.6900380
- 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()
- 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)|).
- update_population_size(nfe: int, total_nfe: int, start_pop_size: int, min_pop_size: int)[source]
Calculate new population size using Linear Population Size Reduction (LPSR).
Parameters: - nfe (int): The current function evaluations. - total_nfe (int): The total number of function evaluations. - start_pop_size (int): The initial population size. - min_pop_size (int): The minimum population size.
- write_results_to_database(results_data)
- class detpy.DETAlgs.data.alg_data.LShadeData(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, population_reduction_strategy: detpy.DETAlgs.population_reduction.population_size_reduction_strategy.PopulationSizeReductionStrategy = <detpy.DETAlgs.population_reduction.linear_population_size_reduction.LinearPopulationSizeReduction object at 0x7f136820a000>, minimum_population_size: int = 5, 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
- minimum_population_size: int = 5
- optimization_type: OptimizationType = 'minimization'
- parallel_processing: list | None = None
- population_reduction_strategy: PopulationSizeReductionStrategy = <detpy.DETAlgs.population_reduction.linear_population_size_reduction.LinearPopulationSizeReduction object>
- population_size: int = 100
- show_plots: bool = True
- ub: list