optuna.distributions.LogUniformDistribution

class optuna.distributions.LogUniformDistribution(low, high)[source]

A uniform distribution in the log domain.

This object is instantiated by suggest_float() with log=True and suggest_loguniform(), and passed to samplers 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 from the range.

Raises

ValueError – If low value is larger than high value, or low value is smaller than or equal to 0.

Methods

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.

single()[source]

Test whether the range of this distribution contains just a single value.

Returns

True if the range of this distribution contains just a single value, otherwise False.

Return type

bool

to_external_repr(param_value_in_internal_repr)

Convert internal representation of a parameter value into external representation.

Parameters

param_value_in_internal_repr (float) – Optuna’s internal representation of a parameter value.

Returns

Optuna’s external representation of a parameter value.

Return type

Any

to_internal_repr(param_value_in_external_repr)

Convert external representation of a parameter value into internal representation.

Parameters

param_value_in_external_repr (Any) – Optuna’s external representation of a parameter value.

Returns

Optuna’s internal representation of a parameter value.

Return type

float