class optuna.samplers.IntersectionSearchSpace(include_pruned=False)[source]

A class to calculate the intersection search space of a Study.

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(), a ValueError is raised.


include_pruned (bool) – Whether pruned trials should be included in the search space.


Deprecated in v3.2.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v4.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v3.2.0.

Please use optuna.search_space.IntersectionSearchSpace instead.


calculate(study[, ordered_dict])

Returns the intersection search space of the Study.

calculate(study, ordered_dict=False)[source]

Returns the intersection search space of the Study.

  • study (Study) – A study with completed trials. The same study must be passed for one instance of this class through its lifetime.

  • ordered_dict (bool) – A boolean flag determining the return type. If False, the returned object will be a dict. If True, the returned object will be a dict sorted by keys, i.e. parameter names.


A dictionary containing the parameter names and parameter’s distributions.

Return type:

Dict[str, BaseDistribution]