optuna.distributions.LogUniformDistribution

class optuna.distributions.LogUniformDistribution(low, high)[源代码]

对数域中的均匀分布。

此对象由 suggest_float()log=True 时实例化,并通常传递给 samplers

参数:
low

分布范围的下端点。low 包含在范围内。low 必须大于 0。low 必须小于或等于 high

high

分布范围的上限。high 包含在范围内。high 必须大于或等于 low

警告

在 v3.0.0 中已弃用。此功能将在未来被移除。该功能的移除目前计划在 v6.0.0 进行,但此时间表可能会更改。请参阅 https://github.com/optuna/optuna/releases/tag/v3.0.0

使用 FloatDistribution 代替。

方法

single()

测试此分布的范围是否仅包含一个值。

to_external_repr(param_value_in_internal_repr)

将参数值的内部表示转换为外部表示。

to_internal_repr(param_value_in_external_repr)

将参数值的外部表示转换为内部表示。

single()

测试此分布的范围是否仅包含一个值。

返回:

True if the range of this distribution contains just a single value, otherwise False.

返回类型:

bool

to_external_repr(param_value_in_internal_repr)

将参数值的内部表示转换为外部表示。

参数:

param_value_in_internal_repr (float) – Optuna 内部表示的参数值。

返回:

Optuna 的参数值的外部表示。

返回类型:

Any

to_internal_repr(param_value_in_external_repr)

将参数值的外部表示转换为内部表示。

参数:

param_value_in_external_repr (float) – Optuna 的参数值的外部表示。

返回:

Optuna 内部表示的参数值。

返回类型:

float