optuna.distributions.FloatDistribution
- class optuna.distributions.FloatDistribution(low, high, log=False, step=None)[源代码]
浮点数上的分布。
此对象由
suggest_float()实例化,通常传递给samplers。备注
When
stepis notNone, if the range \([\mathsf{low}, \mathsf{high}]\) is not divisible by \(\mathsf{step}\), \(\mathsf{high}\) will be replaced with the maximum of \(k \times \mathsf{step} + \mathsf{low} < \mathsf{high}\), where \(k\) is an integer.- low
Lower endpoint of the range of the distribution.
lowis included in the range.lowmust be less than or equal tohigh. IflogisTrue,lowmust be larger than 0.
- high
分布范围的上限。
high包含在范围内。high必须大于或等于low。
- log
If
logisTrue, this distribution is in log-scaled domain. In this case, all parameters enqueued to the distribution must be positive values. This parameter must beFalsewhen the parameterstepis notNone.
- step
A discretization step.
stepmust be larger than 0. This parameter must beNonewhen the parameterlogisTrue.
方法
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)
将参数值的内部表示转换为外部表示。