-
Notifications
You must be signed in to change notification settings - Fork 18
Guided Optimisation
The guided optimisation feature allows users to refine and control the optimisation process based on their domain knowledge and preferences. This feature provides the ability to freeze certain parameters, define custom ranges for parameters, and group parameters for simultaneous optimisation.
To enable guided optimisation, set guided_optimisation = True
in your config.yaml
and modify conf/optimisation_guide/guide.yaml
accordingly. The main components of the guided optimisation feature are as follows:
- Frozen Parameters: This feature allows users to fix the values of certain parameters during the optimisation process. By freezing a parameter, its value will not be changed or optimised during the process. To use this feature, pass a dictionary containing the names of the parameters to be frozen and their respective fixed values:
frozen_params:
block_0_alpha: 0.9
base_alpha: 0.5
- Custom Ranges: Custom ranges can be defined for parameters, limiting the search space of the optimisation process. To use this feature, pass a dictionary containing the names of the parameters and their respective custom ranges (min and max values):
custom_ranges:
block_1_beta: [0.1, 0.5]
block_2_beta: [0.4, 1.0]
- Parameter Groups: Parameters can be grouped together, so they share the same value during the optimisation process. This feature can be helpful when certain parameters are expected to have similar effects on the target function. To use this feature, pass a list of lists containing the names of the parameters to be grouped:
groups:
- [block_1_alpha, block_2_alpha, block_3_alpha]
- [block_3_beta, block_4_beta, base_beta]
During the optimisation, the chosen optimiser will take these constraints into account when searching for the optimal parameter values.
- how do I set a value to the group? the group takes the value of the first block in the group
say you define
frozen_params:
block_0_alpha: 0.9
groups:
- [block_0_alpha, block_1_alpha]
this way both block_0_alpha
and block_1_alpha
will have 0.9
. However, if you do
frozen_params:
block_1_alpha: 0.9
groups:
- [block_0_alpha, block_1_alpha]
block_1_alpha
will not be frozen but overwritten by block_0_alpha
which now is taken in the usual range [0.0, 1.0]
.