# deephyper.problem.Integer#

`deephyper.problem.``Integer`(name: str, bounds: tuple[int, int] | None = None, *, distribution: = None, default: = None, q: = None, log: bool = False, meta: = None)ConfigSpace.hyperparameters.UniformIntegerHyperparameter[source]#
`deephyper.problem.``Integer`(name: str, bounds: tuple[int, int] | None = None, *, distribution: ConfigSpace.api.distributions.Normal, default: = None, q: = None, log: bool = False, meta: = None)ConfigSpace.hyperparameters.NormalIntegerHyperparameter
`deephyper.problem.``Integer`(name: str, bounds: tuple[int, int] | None = None, *, distribution: ConfigSpace.api.distributions.Beta, default: = None, q: = None, log: bool = False, meta: = None)ConfigSpace.hyperparameters.BetaIntegerHyperparameter

Create an IntegerHyperparameter.

```# Uniformly distributed
Integer("a", (1, 10))
Integer("a", (1, 10), distribution=Uniform())

# Normally distributed at 2 with std 3
Integer("b", distribution=Normal(2, 3))
Integer("b", (0, 5), distribution=Normal(2, 3))  # ... bounded

# Beta distributed with alpha 1 and beta 2
Integer("c", distribution=Beta(1, 2))
Integer("c", (0, 3), distribution=Beta(1, 2))  # ... bounded

# Give it a default value
Integer("a", (1, 10), default=4)

# Sample on a log scale
Integer("a", (1, 100), log=True)

# Quantized into three brackets
Integer("a", (1, 10), q=3)

# Add meta info to the param
Integer("a", (1, 10), meta={"use": "For counting chickens"})
```

Note

Integer is actually a function, please use the corresponding return types if doing an isinstance(param, type) check and not Integer.

Parameters
• name (str) – The name to give to this hyperparameter

• bounds (tuple[int, int] | None = None) – The bounds to give to the integer. Note that by default, this is required for Uniform distribution, which is the default distribution

• distribution (Uniform | Normal | Beta, = Uniform) – The distribution to use for the hyperparameter. See above

• default (int | None = None) – The default value to give to the hyperparameter.

• q (int | None = None) –

The quantization factor, must evenly divide the boundaries. Sampled values will be

```    full range
1    4    7    10
|--------------|
|    |    |    |  q = 3
```

All samples here will then be in {1, 4, 7, 10}

Note

Quantization points act are not equal and require experimentation to be certain about

• log (bool = False) – Whether to this parameter lives on a log scale

• meta (dict | None = None) – Any meta information you want to associate with this parameter

Returns

Returns the corresponding hyperparameter type

Return type

UniformIntegerHyperparameter | NormalIntegerHyperparameter | BetaIntegerHyperparameter