optuna.distributions.check_distribution_compatibility

optuna.distributions.check_distribution_compatibility(dist_old, dist_new)[源代码]

A function to check compatibility of two distributions.

Note that this method is not supposed to be called by library users.

参数
  • dist_old (optuna.distributions.BaseDistribution) – A distribution previously recorded in storage.

  • dist_new (optuna.distributions.BaseDistribution) – A distribution newly added to storage.

返回

True denotes given distributions are compatible. Otherwise, they are not.

引发

ValueError – If different distribution kinds are set to dist_old and dist_new, or dist_old.choices doesn’t match dist_new.choices for CategoricalDistribution.

返回类型

None