optuna.distributions.CategoricalDistribution
- class optuna.distributions.CategoricalDistribution(choices)[source]
カテゴリカル分布を表すクラス。
suggest_categorical()
によって生成され、samplers
モジュールで使用されます。- Parameters:
choices (Sequence[CategoricalChoiceType]) – パラメータ値の候補。少なくとも1つの要素が必要です。
- choices
パラメータ値の候補。
メソッド
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.