f3dasm_optimize.Ftrl
- class Ftrl(domain, learning_rate=0.001, learning_rate_power=-0.5, initial_accumulator_value=0.1, l1_regularization_strength=0.0, l2_regularization_strength=0.0, l2_shrinkage_regularization_strength=0.0, beta=0.0, **kwargs)[source]
Bases:
TensorflowOptimizer
List of Public Methods
Update step of the optimizer. Needs to be implemented
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
- update_step(data_generator)
- Update step of the optimizer. Needs to be implemented
by the child class
- Parameters:
data_generator (DataGenerator) – data generator object to calculate the objective value
- Returns:
ExperimentData object containing the new samples
- Return type:
ExperimentData
- Raises:
NotImplementedError – Raises when the method is not implemented by the child class
Note
You can access the data attribute of the optimizer to get the available data points. The data attribute is an f3dasm.ExperimentData object.