optuna.search_space.intersection_search_space

optuna.search_space.intersection_search_space(trials, include_pruned=False)[源代码]

返回给定 trial 的交叉搜索空间。

交叉搜索空间包含研究到目前为止已完成的 trial 中建议的参数分布的交集。如果存在同名但分布不同的多个参数,则两者都不会包含在结果搜索空间中(即,具有动态值范围的参数将被排除)。

注意

IntersectionSearchSpace 以更快捷的方式提供相同的功能。如果您希望尽可能缩短执行时间,请考虑使用它。

参数:
  • trials (list[FrozenTrial]) – trial 的列表。

  • include_pruned (bool) – 是否应将修剪的 trial 包含在搜索空间中。

返回:

一个包含参数名称和按参数名称排序的参数分布的字典。

返回类型:

dict[str, BaseDistribution]