Skip to content

Commit

Permalink
Update optimization.md (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
teytaud committed Dec 3, 2019
1 parent 6544422 commit 2967cb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/optimization.md
Expand Up @@ -22,8 +22,8 @@ print(recommendation)
`recommendation` holds the optimal attributes `args` and `kwargs` found by the optimizer for the provided function.
In this example, the optimal value will be found in `recommendation.args[0]` and will be a `np.ndarray` of size 2.

`instrumentation=n` is a shortcut to state that the function has only one variable, of dimension `n`,
Defining the following instrumentation instead will optimize on both `x` and `y`.
`instrumentation=n` is a shortcut to state that the function has only one variable, continuous, of dimension `n`,
Defining the following instrumentation instead will optimize on both `x` (continuous, dimension 2) and `y` (continuous, dimension 1).
```python
instrum = ng.Instrumentation(ng.var.Array(2), y=ng.var.Array(1).asscalar())
optimizer = ng.optimizers.OnePlusOne(instrumentation=instrum, budget=100)
Expand Down

0 comments on commit 2967cb8

Please sign in to comment.