optuna.distributions.FloatDistribution
- class optuna.distributions.FloatDistribution(low, high, log=False, step=None)[source]
一个浮点数分布。
此对象由
suggest_float()
实例化,并通常传递给samplers
。注意
当
step
不是None
时,如果范围 \([\mathsf{low}, \mathsf{high}]\) 不能被 \(\mathsf{step}\) 整除,则 \(\mathsf{high}\) 将被替换为小于原始 \(\mathsf{high}\) 的、形式为 \(k \times \mathsf{step} + \mathsf{low}\) 的最大值,其中 \(k\) 是一个整数。- high
分布范围的上限。范围包含
high
。high
必须大于或等于low
。
方法
single
()测试此分布的范围是否仅包含一个值。
to_external_repr
(param_value_in_internal_repr)将参数值的内部表示转换为外部表示。
to_internal_repr
(param_value_in_external_repr)将参数值的外部表示转换为内部表示。
- to_external_repr(param_value_in_internal_repr)
将参数值的内部表示转换为外部表示。