optuna.distributions.IntDistribution
- class optuna.distributions.IntDistribution(low, high, log=False, step=1)[source]
整数の分布を表すクラス。
suggest_int()
によってインスタンス化され、samplers
モジュールで一般的に使用されます。Note
step
がNone
でない場合、範囲 \([\mathsf{low}, \mathsf{high}]\) が \(\mathsf{step}\) で割り切れない場合、\(\mathsf{high}\) は \(k \times \mathsf{step} + \mathsf{low} < \mathsf{high}\) の最大値に置き換えられます。 ここで \(k\) は整数です。- high
分布の範囲の上限。
high
は範囲に含まれます。high
はlow
以上でなければなりません。
- log
log
がTrue
の場合、この分布は対数スケールで扱われます。 この場合、分布にエンキューされるすべてのパラメータは正の値でなければなりません。 パラメータstep
が 1 でない場合、このパラメータはFalse
でなければなりません。
メソッド
single
()Test whether the range of this distribution contains just a single value.
to_external_repr
(param_value_in_internal_repr)Convert internal representation of a parameter value into external representation.
to_internal_repr
(param_value_in_external_repr)Convert external representation of a parameter value into internal representation.