autogenes.Interface.optimize¶
-
Interface.
optimize
(ngen = 2, mode = 'standard', nfeatures = None, weights = None, objectives = None, seed = 0, verbose = True, **kwargs)¶ Runs multi-objective optimizer
This method runs an evolutionary algorithm to find gene selections that optimize certain objectives. It can run for a different number of generations and in different modes. For more information on genetic algorithms and their parameters, refer to the DEAP documention.
- Parameters
ngen (int, optional (default: 2)) – Number of generations. The higher, the longer it takes
mode (standard, fixed, optional (default: standard)) – In standard mode, the number of genes of a selection is allowed to vary arbitrarily. In fixed mode, the number of selected genes is fixed (using nfeatures)
nfeatures (int, optional (default: int)) – Number of genes to be selected in fixed mode
weights ((int, …), optional (default: (-1,1))) – Weights applied to the objectives. For the optimization, only the sign is relevant: 1 means to maximize the respective objective, -1 to minimize it and 0 means to ignore it. The weight supplied here will be the default weight for selection. There must be as many weights as there are objectives
objectives (([str,function], …), optional (default: (‘correlation’,’distance’))) – The objectives to maximize or minimize. Must have the same length as weights. The default objectives (correlation, distance) can be referred to using strings. For custom objectives, a function has to be passed. For further details, refer to the respective tutorial.
seed (int, optional (default: 0)) – Seed for random number generators
verbose (bool, optional (default: True)) – If True, output a progress summary of the optimization (the current generation, size of the pareto front, min and max values of all objectives)
population_size (int, optional (default: 100)) – Size of every generation (mu parameter)
offspring_size (int, optional (default: 50)) – Number of individuals created in every generation (lambda parameter)
crossover_pb (float, optional (default: 0.7)) – Crossover probability
mutation_pb (float, optional (default: 0.3)) – Mutation probability
mutate_flip_pb (float, optional (default: 1E-3)) – Mutation flipping probability (fixed mode)
crossover_thres (int, optional (default: 1000)) – Crossover threshold (standard mode)
ind_standard_pb (float, optional (default: 0.1)) – Probability used to generate initial population in standard mode
- Returns
None