metaheuristic_designer.strategies.EDA.UMDA module#
Univariate Marginal Distribution Algorithm (UMDA) strategies.
- class BernoulliUMDA(initializer, parent_sel=None, survivor_sel=None, name='BernoulliUMDA', offspring_size=None, rng=None, p=0.5, noise=0, **kwargs)[source]#
Bases:
EDAStrategyUMDA for binary vectors using a Bernoulli distribution.
The probability vector is estimated from the selected parents (no smoothing). Gaussian noise can optionally be added.
Reference: https://doi.org/10.1016/j.swevo.2011.08.003
- Parameters:
- initializerInitializer
Population initializer.
- parent_selParentSelection, optional
Parent selection method.
- survivor_selSurvivorSelection, optional
Survivor selection method.
- namestr, optional
Display name (default
"BernoulliUMDA").- offspring_sizeint or SchedulableParameter, optional
Number of offspring per generation.
- rngRNGLike, optional
Random number generator.
- pfloat or array-like, optional
Initial probability (default 0.5).
- noisefloat, optional
Gaussian noise standard deviation (default 0).
- **kwargs
Forwarded to
EDAStrategy.
- Attributes:
paramsAccess parameter values by attribute-style lookup.
population_sizeGets the amount of individuals in the population.
- Parameters:
initializer (Initializer)
parent_sel (ParentSelection)
survivor_sel (SurvivorSelection)
name (str)
offspring_size (Optional[int | SchedulableParameter])
rng (Optional[RNGLike])
p (ScalarLike | SchedulableParameter)
noise (ScalarLike | SchedulableParameter)
Methods
estimate_parameters(population)Utilizes the samples present in the input population to estimate the parameters used by the operator.
extra_report()Hook called at the end of the optimization (intended for subclasses).
extra_step_info()Hook called after each generation (intended for subclasses).
gather_parameters()Collect the current parameters from all sub-components.
get_params()Return a copy of the current parameter dictionary.
get_state()Gets the current state of the search strategy as a dictionary.
initialize(objfunc)Initializes the optimization search strategy.
step(prev_population, objfunc)Performs a single iteration of the algorithm on a given population.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Advances the state of the search by one iteration.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
reset
- class BinomialUMDA(initializer, parent_sel=None, survivor_sel=None, name='BinomialUMDA', offspring_size=None, rng=None, p=0.5, n=None, noise=0, **kwargs)[source]#
Bases:
EDAStrategyUMDA for discrete vectors using a Binomial distribution.
Reference: https://doi.org/10.1016/j.swevo.2011.08.003
- Parameters:
- initializerInitializer
Population initializer.
- parent_selParentSelection, optional
Parent selection method.
- survivor_selSurvivorSelection, optional
Survivor selection method.
- namestr, optional
Display name (default
"BinomialUMDA").- offspring_sizeint or SchedulableParameter, optional
Number of offspring per generation.
- rngRNGLike, optional
Random number generator.
- pfloat or array-like, optional
Initial success probability (default 0.5).
- nint or array-like
Number of trials. Must be provided; there is no default.
- noisefloat, optional
Gaussian noise standard deviation (default 0).
- **kwargs
Forwarded to
EDAStrategy.
- Attributes:
paramsAccess parameter values by attribute-style lookup.
population_sizeGets the amount of individuals in the population.
- Parameters:
initializer (Initializer)
parent_sel (ParentSelection)
survivor_sel (SurvivorSelection)
name (str)
offspring_size (Optional[int | SchedulableParameter])
rng (Optional[RNGLike])
p (ScalarLike | SchedulableParameter)
n (ScalarLike | SchedulableParameter)
Methods
estimate_parameters(population)Utilizes the samples present in the input population to estimate the parameters used by the operator.
extra_report()Hook called at the end of the optimization (intended for subclasses).
extra_step_info()Hook called after each generation (intended for subclasses).
gather_parameters()Collect the current parameters from all sub-components.
get_params()Return a copy of the current parameter dictionary.
get_state()Gets the current state of the search strategy as a dictionary.
initialize(objfunc)Initializes the optimization search strategy.
step(prev_population, objfunc)Performs a single iteration of the algorithm on a given population.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Advances the state of the search by one iteration.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
reset
- class GaussianUMDA(initializer, parent_sel=None, survivor_sel=None, name='GaussianUMDA', offspring_size=None, rng=None, loc=0, scale=1, noise=0, **kwargs)[source]#
Bases:
EDAStrategyUMDA for continuous vectors using a Gaussian distribution.
The location vector is estimated from the selected parents. Gaussian noise can optionally be added.
Reference: https://doi.org/10.1016/j.swevo.2011.08.003
- Parameters:
- initializerInitializer
Population initializer.
- parent_selParentSelection, optional
Parent selection method.
- survivor_selSurvivorSelection, optional
Survivor selection method.
- namestr, optional
Display name (default
"GaussianUMDA").- offspring_sizeint or SchedulableParameter, optional
Number of offspring per generation.
- rngRNGLike, optional
Random number generator.
- locfloat or array-like, optional
Initial mean (default 0).
- scalefloat or array-like, optional
Standard deviation (default 1).
- noisefloat, optional
Gaussian noise standard deviation added to loc (default 0).
- **kwargs
Forwarded to
EDAStrategy.
- Attributes:
paramsAccess parameter values by attribute-style lookup.
population_sizeGets the amount of individuals in the population.
- Parameters:
initializer (Initializer)
parent_sel (ParentSelection)
survivor_sel (SurvivorSelection)
name (str)
offspring_size (Optional[int | SchedulableParameter])
loc (ScalarLike | VectorLike | SchedulableParameter)
scale (ScalarLike | VectorLike | SchedulableParameter)
noise (ScalarLike | SchedulableParameter)
Methods
estimate_parameters(population)Utilizes the samples present in the input population to estimate the parameters used by the operator.
extra_report()Hook called at the end of the optimization (intended for subclasses).
extra_step_info()Hook called after each generation (intended for subclasses).
gather_parameters()Collect the current parameters from all sub-components.
get_params()Return a copy of the current parameter dictionary.
get_state()Gets the current state of the search strategy as a dictionary.
initialize(objfunc)Initializes the optimization search strategy.
step(prev_population, objfunc)Performs a single iteration of the algorithm on a given population.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Advances the state of the search by one iteration.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
reset