optuna.samplers.nsgaii.BLXAlphaCrossover
- class optuna.samplers.nsgaii.BLXAlphaCrossover(alpha=0.5)[源代码]
NSGAIISampler
使用的混合交叉操作。从两个父个体创建的超矩形中均匀采样子个体。有关 BLX-alpha 交叉的更多信息,请参阅以下论文
- 参数:
alpha (float) – 参数化混合操作。
注意
在 v3.0.0 中作为实验性功能添加。接口可能会在更新版本中更改,恕不另行通知。参见 https://github.com/optuna/optuna/releases/tag/v3.0.0。
方法
crossover
(parents_params, rng, study, ...)对选定的父个体执行交叉操作。
属性
n_parents
- crossover(parents_params, rng, study, search_space_bounds)[源代码]
对选定的父个体执行交叉操作。
此方法在
sample_relative()
中调用。- 参数:
parents_params (np.ndarray) – 一个维度为
num_parents x num_parameters
的numpy.ndarray
。表示每个父个体的参数空间。对于数值参数,此空间是连续的。rng (np.random.RandomState) –
numpy.random.RandomState
的实例。study (Study) – 目标研究对象。
search_space_bounds (np.ndarray) – 一个维度为
len_search_space x 2
的numpy.ndarray
,表示根据转换后的搜索空间构建的数值分布边界。
- 返回值:
一个包含新参数组合的 1 维
numpy.ndarray
。- 返回类型:
np.ndarray