Distributions¶

class
optuna.distributions.
UniformDistribution
[source]¶ A uniform distribution in the linear domain.
This object is instantiated by
suggest_uniform()
, and passed tosamplers
in general.
low
¶ Lower endpoint of the range of the distribution.
low
is included in the range.

high
¶ Upper endpoint of the range of the distribution.
high
is excluded from the range.


class
optuna.distributions.
LogUniformDistribution
[source]¶ A uniform distribution in the log domain.
This object is instantiated by
suggest_loguniform()
, and passed tosamplers
in general.
low
¶ Lower endpoint of the range of the distribution.
low
is included in the range.

high
¶ Upper endpoint of the range of the distribution.
high
is excluded from the range.


class
optuna.distributions.
DiscreteUniformDistribution
[source]¶ A discretized uniform distribution in the linear domain.
This object is instantiated by
suggest_discrete_uniform()
, and passed tosamplers
in general.
low
¶ Lower endpoint of the range of the distribution.
low
is included in the range.

high
¶ Upper endpoint of the range of the distribution.
high
is included in the range.

q
¶ A discretization step.


class
optuna.distributions.
IntUniformDistribution
[source]¶ A uniform distribution on integers.
This object is instantiated by
suggest_int()
, and passed tosamplers
in general.
low
¶ Lower endpoint of the range of the distribution.
low
is included in the range.

high
¶ Upper endpoint of the range of the distribution.
high
is included in the range.


class
optuna.distributions.
CategoricalDistribution
[source]¶ A categorical distribution.
This object is instantiated by
suggest_categorical()
, and passed tosamplers
in general.
choices
¶ Candidates of parameter values.


optuna.distributions.
distribution_to_json
(dist)[source]¶ Serialize a distribution to JSON format.
Parameters: dist – A distribution to be serialized. Returns: A JSON string of a given distribution.

optuna.distributions.
json_to_distribution
(json_str)[source]¶ Deserialize a distribution in JSON format.
Parameters: json_str – A JSONserialized distribution. Returns: A deserialized distribution.

optuna.distributions.
check_distribution_compatibility
(dist_old, dist_new)[source]¶ A function to check compatibility of two distributions.
Note that this method is not supposed to be called by library users.
Parameters:  dist_old – A distribution previously recorded in storage.
 dist_new – A distribution newly added to storage.
Returns: True denotes given distributions are compatible. Otherwise, they are not.