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: EDAStrategy

UMDA 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:
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:

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

estimate_parameters(population)[source]#

Utilizes the samples present in the input population to estimate the parameters used by the operator.

Parameters:
populationPopulation

Data to use for estimating parameters.

Returns:
Operator

Newly configured operator.

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: EDAStrategy

UMDA 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:
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:

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

estimate_parameters(population)[source]#

Utilizes the samples present in the input population to estimate the parameters used by the operator.

Parameters:
populationPopulation

Data to use for estimating parameters.

Returns:
Operator

Newly configured operator.

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: EDAStrategy

UMDA 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:
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:

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

estimate_parameters(population)[source]#

Utilizes the samples present in the input population to estimate the parameters used by the operator.

Parameters:
populationPopulation

Data to use for estimating parameters.

Returns:
Operator

Newly configured operator.