optuna.distributions.IntLogUniformDistribution

class optuna.distributions.IntLogUniformDistribution(low, high, step=1)[源代码]

A uniform distribution on integers in the log domain.

This object is instantiated by suggest_int(), 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 in the range.

step

A step for spacing between values.

警告

Deprecated in v2.0.0. step argument 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.

Samplers and other components in Optuna relying on this distribution will ignore this value and assume that step is always 1. User-defined samplers may continue to use other values besides 1 during the deprecation.

引发

ValueError – If low value is larger than high value, or low value is smaller than 1.

参数
  • low (int) –

  • high (int) –

  • step (int) –

返回类型

None

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.

Attributes

step

single()[源代码]

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

返回

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

返回类型

bool

to_external_repr(param_value_in_internal_repr)[源代码]

Convert internal representation of a parameter value into external representation.

参数

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

返回

Optuna’s external representation of a parameter value.

返回类型

int

to_internal_repr(param_value_in_external_repr)[源代码]

Convert external representation of a parameter value into internal representation.

参数

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

返回

Optuna’s internal representation of a parameter value.

返回类型

float