Skip to content

Commit df18ca1

Browse files
comparison table updated
1 parent 068e8c0 commit df18ca1

File tree

1 file changed

+20
-31
lines changed

1 file changed

+20
-31
lines changed

docs/proposals/parameter-distribution.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,26 @@ A Data Scientist requires Katib to support multiple hyperparameter distributions
2222
## Proposal
2323

2424
### Parameter Distribution Comparison Table
25-
| Distribution Type | Hyperopt | Optuna | Ray Tune |
26-
|-------------------------------|-----------------------|--------------------------------------|-----------------------|
27-
| **Uniform Continuous** | `hp.uniform` | `FloatDistribution` | `tune.uniform` |
28-
| **Quantized Uniform** | `hp.quniform` | `DiscreteUniformDistribution`(deprecated) Use `FloatDistribution` instead. | `tune.quniform` |
29-
| **Log Uniform** | `hp.loguniform` | `LogUniformDistribution`(deprecated) Use `FloatDistribution` instead with `log` boolean. | `tune.loguniform` |
30-
| **Uniform Integer** | `hp.randint` or quantized distributions with step size `q` set to 1 | `IntDistribution` | `tune.randint` |
31-
| **Categorical** | `hp.choice` | `CategoricalDistribution` | `tune.choice` |
32-
| **Quantized Log Uniform** | `hp.qloguniform` | Custom Implementation Use `FloatDistribution` instead with `log` boolean step must be `None` if log is true. | `tune.qloguniform` |
33-
| **Normal** | `hp.normal` | (Not directly supported) | `tune.randn` |
34-
| **Quantized Normal** | `hp.qnormal` | (Not directly supported) | `tune.qrandn` |
35-
| **Log Normal** | `hp.lognormal` | (Not directly supported) | (Use custom transformation in `tune.randn`) |
36-
| **Quantized Log Normal** | `hp.qlognormal` | (Not directly supported) | (Use custom transformation in `tune.qrandn`) |
37-
| **Quantized Integer** | `hp.quniformint` | `IntUniformDistribution`(deprecated) Use `IntDistribution` instead. | |
38-
| **Log Integer** | | `IntLogUniformDistribution`(deprecated) Use `IntDistribution` instead. | `tune.lograndint` |
39-
40-
### How is Nevergrad implementing Hyperopt?
41-
Nevergrad maps parameter types (like p.Scalar, p.Log, p.Choice, etc.) from Nevergrad to corresponding Hyperopt search space definitions (hp.uniform, hp.loguniform, hp.choice, etc.).
42-
ref: https://github.com/facebookresearch/nevergrad/blob/c23f20406d9223afbe253f9807ca7e8ba993a1ac/nevergrad/optimization/externalbo.py#L47
43-
```python
44-
def _get_search_space(param_name, param):
45-
if isinstance(param, p.Scalar):
46-
...
47-
return hp.uniform(param_name, param.bounds[0][0], param.bounds[1][0])
48-
elif isinstance(param, p.Log):
49-
...
50-
return hp.loguniform(param_name, np.log(param.bounds[0][0]), np.log(param.bounds[1][0]))
51-
elif isinstance(param, p.Choice):
52-
...
53-
return hp.choice()
54-
```
55-
The `_get_search_space` function constructs a search space that represents the entire parameter space defined by Nevergrad.
25+
### Parameter Distribution Comparison Table
26+
27+
| Distribution Type | Hyperopt | Optuna | Ray Tune | Nevergrad |
28+
|-------------------------------|-----------------------|-------------------------------------------------|-----------------------|---------------------------------------------|
29+
| **Uniform Continuous** | `hp.uniform` | `FloatDistribution` | `tune.uniform` | `p.Scalar` with uniform transformation |
30+
| **Quantized Uniform** | `hp.quniform` | `DiscreteUniformDistribution` (deprecated) | `tune.quniform` | `p.Scalar` with uniform and step specified |
31+
| **Log Uniform** | `hp.loguniform` | `LogUniformDistribution` (deprecated) | `tune.loguniform` | `p.Log` with uniform transformation |
32+
| **Uniform Integer** | `hp.randint` or quantized distributions with step size `q` set to 1 | `IntDistribution` | `tune.randint` | `p.Scalar` with integer transformation |
33+
| **Categorical** | `hp.choice` | `CategoricalDistribution` | `tune.choice` | `p.Choice` |
34+
| **Quantized Log Uniform** | `hp.qloguniform` | Custom Implementation | `tune.qloguniform` | `p.Log` with uniform and step specified |
35+
| **Normal** | `hp.normal` | (Not directly supported) | `tune.randn` | (Not directly supported) |
36+
| **Quantized Normal** | `hp.qnormal` | (Not directly supported) | `tune.qrandn` | (Not directly supported) |
37+
| **Log Normal** | `hp.lognormal` | (Not directly supported) | (Use custom transformation in `tune.randn`) | (Not directly supported) |
38+
| **Quantized Log Normal** | `hp.qlognormal` | (Not directly supported) | (Use custom transformation in `tune.qrandn`) | (Not directly supported) |
39+
| **Quantized Integer** | `hp.quniformint` | `IntUniformDistribution` (deprecated) | | `p.Scalar` with integer and step specified |
40+
| **Log Integer** | | `IntLogUniformDistribution` (deprecated) | `tune.lograndint` | `p.Scalar` with log-integer transformation |
41+
42+
43+
- Note:
44+
In Nevergrad, parameter types like p.Scalar, p.Log, and p.Choice are mapped to corresponding Hyperopt search space definitions like hp.uniform, hp.loguniform, and hp.choice using internal functions to convert parameter bounds and distributions.
5645

5746
## API Design
5847
### FeasibleSpace

0 commit comments

Comments
 (0)