optuna.samplers.IntersectionSearchSpace
- class optuna.samplers.IntersectionSearchSpace(include_pruned=False)[源代码]
A class to calculate the intersection search space of a
BaseStudy
.Intersection search space contains the intersection of parameter distributions that have been suggested in the completed trials of the study so far. If there are multiple parameters that have the same name but different distributions, neither is included in the resulting search space (i.e., the parameters with dynamic value ranges are excluded).
Note that an instance of this class is supposed to be used for only one study. If different studies are passed to
calculate()
, aValueError
is raised.- 参数
include_pruned (bool) – Whether pruned trials should be included in the search space.
- 返回类型
None
Methods
calculate
(study[, ordered_dict])Returns the intersection search space of the
BaseStudy
.- calculate(study, ordered_dict=False)[源代码]
Returns the intersection search space of the
BaseStudy
.- 参数
study (optuna.study.BaseStudy) – A study with completed trials.
ordered_dict (bool) – A boolean flag determining the return type. If
False
, the returned object will be adict
. IfTrue
, the returned object will be ancollections.OrderedDict
sorted by keys, i.e. parameter names.
- 返回
A dictionary containing the parameter names and parameter’s distributions.
- 引发
ValueError – If different studies are passed into this method.
- 返回类型