optuna.distributions.FloatDistribution
- class optuna.distributions.FloatDistribution(low, high, log=False, step=None)[源代码]
浮点数上的分布。
此对象由
suggest_float()实例化,并通常传递给samplers。注意
当
step不是None时,如果区间 \([\mathsf{low}, \mathsf{high}]\) 不能被 \(\mathsf{step}\) 整除,则 \(\mathsf{high}\) 将被替换为 \(k \times \mathsf{step} + \mathsf{low} < \mathsf{high}\) 的最大值,其中 \(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)
将参数值的内部表示转换为外部表示。