f3dasm_optimize.CMAES
- class CMAES(domain, population=30, force_bounds=True, seed=None, **kwargs)[source]
Bases:
PygmoAlgorithm
Covariance Matrix Adaptation Evolution Strategy optimizer implemented from pygmo
List of Public Methods
Update step of the algorithm
Attributes
require_gradients
type
Methods
- _check_number_of_datapoints()
- Check if the number of datapoints is sufficient
for the initial population
- Raises:
ValueError – Raises when the number of datapoints is insufficient
- _construct_model(data_generator)
Method that is called before the optimization starts. This method can be used to construct a model based on the available data or a specific data generator.
- Parameters:
data_generator (DataGenerator) – DataGenerator object
Note
When this method is not implemented, the method will do nothing.
- property _population: int
Property to return the population size of the optimizer
- Returns:
Number of individuals in the population
- Return type:
Note
If the population is not set, the property will return 1 This is done to prevent errors when the population size is not an available attribute in a custom optimizer class.
- _reset(data)
Reset the optimizer to its initial state
- property _seed: int
Property to return the seed of the optimizer
- Returns:
Seed of the optimizer
- Return type:
int | None
Note
If the seed is not set, the property will return None This is done to prevent errors when the seed is not an available attribute in a custom optimizer class.
- _set_algorithm()[source]
Method that can be implemented to set the optimization algorithm. Whenever the reset method is called, this method will be called to reset the algorithm to its initial state.
- _set_data(data)
Set the data attribute to the given data