# deephyper.problem.Float#

deephyper.problem.Float(name: str, bounds: = None, *, distribution: = None, default: = None, q: = None, log: bool = False, meta: = None) [source]#
deephyper.problem.Float(name: str, bounds: = None, *, distribution: Normal, default: = None, q: = None, log: bool = False, meta: = None)
deephyper.problem.Float(name: str, bounds: = None, *, distribution: Beta, default: = None, q: = None, log: bool = False, meta: = None)

Create a FloatHyperparameter.

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

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

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

# Give it a default value
Float("a", (1, 10), default=4.3)

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

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

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

Note

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

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

• bounds (tuple[float, float] | None = None) – The bounds to give to the float. 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 (float | None = None) – The default value to give to the hyperparameter.

• q (float | None = None) –

The quantization factor, must evenly divide the boundaries.

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: