optuna.distributions.IntLogUniformDistribution¶
-
class
optuna.distributions.IntLogUniformDistribution(low: int, high: int, step: int = 1)[source]¶ A uniform distribution on integers in the log domain.
This object is instantiated by
suggest_int(), and passed tosamplersin general.-
low¶ Lower endpoint of the range of the distribution.
lowis included in the range.
-
high¶ Upper endpoint of the range of the distribution.
highis included in the range.
-
step¶ A step for spacing between values.
Note
This value is valid for only 1. Otherwise, the value is replaced with 1.
Warning
Deprecated in v2.0.0.
stepargument will be removed in the future. The removal of this feature is currently scheduled for v4.0.0, but this schedule is subject to change.
-
__init__(low: int, high: int, step: int = 1) → None[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(low, high[, step])Initialize self.
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() → bool[source]¶ Test whether the range of this distribution contains just a single value.
When this method returns
True,samplersalways sample the same value from the distribution.
-
to_external_repr(param_value_in_internal_repr: float) → int[source]¶ Convert internal representation of a parameter value into external representation.
- Parameters
param_value_in_internal_repr – Optuna’s internal representation of a parameter value.
- Returns
Optuna’s external representation of a parameter value.
-
to_internal_repr(param_value_in_external_repr: int) → float[source]¶ Convert external representation of a parameter value into internal representation.
- Parameters
param_value_in_external_repr – Optuna’s external representation of a parameter value.
- Returns
Optuna’s internal representation of a parameter value.
-