Skip to content

Commit 476d7fc

Browse files
committed
Updates the documentation on toy continuous problems to include low dimensionality
1 parent d4ebf75 commit 476d7fc

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/protein-optimization/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Protein optimization using `poli`
1+
# Discrete sequence optimization using `poli`
22

33
This book contains documentation on how to use `poli` and `poli-baselines`, our tools for creating and optimizing black box objective functions.
44

55
At its core, `poli` allows you to isolate calls to complicated objective functions which might, for example, depend on simulators, binaries, or a weird version of the Java runtime.
66
Our promise is: if you can run your objective function reliably in a `conda` environment, then you can register it and call it from other projects without having to worry about re-installing all the dependencies.
77

8-
`poli` comes batteries-included. By this, we mean that there are already a collection of black box objective functions you could register and use out-of-the-box.
8+
`poli` comes batteries-included. By this, we mean that there are already a collection of black box objective functions and `conda` environments you could register and use out-of-the-box.
99

1010
## Black-box objective functions
1111

12-
These are some objective functions available on `poli`. **For a full list**, [check here](./using_poli/objective_repository/all_objectives.md).
12+
These are some objective functions available on `poli`. [For a full list, check here](./using_poli/objective_repository/all_objectives.md).
1313

1414

1515
### Toy problems

docs/protein-optimization/using_poli/objective_repository/toy_continuous_problems.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,17 @@ x = np.array([[0.0, 0.0]]) # must be of shape [b, n_dimensions], in this case [
5959
# Querying:
6060
print(f(x)) # Should be [[0.0]] in this example
6161
```
62+
63+
## Creating problems with low intrinsic dimensionality
64+
65+
Some optimization algorithms (like [LineBO]() or [SAASBO]()) rely on the assumption that there is a _low intrinsic dimensionality_ to the problem. Roughly speaking, this means that only a subset of the variables are actually relevant to the problem in question. This `poli` objective allows you to create such problems. For example, consider `camelback_2d` (which is usually only defined in two dimensions). You can embed this function into, say, 30 dimensions by creating the objective as follows:
66+
67+
```python
68+
problem_info, f, x0, y0, run_info = objective_factory.create(
69+
name="toy_continuous_problem",
70+
function_name="camelback_2d",
71+
embed_in=30, # This will create a function that takes 30d input values
72+
)
73+
```
74+
75+
During the creation process, the two relevant dimensions of `camelback_2d` will be randomly embedded into two of the 30 dimensions. These are accessible under `f.function.dimensions_to_embed_in` (which is an array of integers).

0 commit comments

Comments
 (0)