# optuna.distributions¶

The distributions module defines various classes representing probability distributions, mainly used to suggest initial hyperparameter values for an optimization trial. Distribution classes inherit from a library-internal BaseDistribution, and is initialized with specific parameters, such as the low and high endpoints for a UniformDistribution.

Optuna users should not use distribution classes directly, but instead use utility functions provided by Trial such as suggest_int().

 optuna.distributions.UniformDistribution A uniform distribution in the linear domain. optuna.distributions.LogUniformDistribution A uniform distribution in the log domain. optuna.distributions.DiscreteUniformDistribution A discretized uniform distribution in the linear domain. optuna.distributions.IntUniformDistribution A uniform distribution on integers. optuna.distributions.IntLogUniformDistribution A uniform distribution on integers in the log domain. optuna.distributions.CategoricalDistribution A categorical distribution. optuna.distributions.distribution_to_json Serialize a distribution to JSON format. optuna.distributions.json_to_distribution Deserialize a distribution in JSON format. optuna.distributions.check_distribution_compatibility A function to check compatibility of two distributions.