Skip to content

Commit ceec2f9

Browse files
committed
Cleans up the remaining documentation of black boxes
1 parent 3e46015 commit ceec2f9

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This objective function returns the partition coefficient of a solute between oc
99

1010
## Prerequisites
1111

12-
- You will need to specify an alphabet `List[str]`.
12+
None. This black box should work out-of-the-box.
1313

1414
## How to run
1515

@@ -32,14 +32,10 @@ import numpy as np
3232

3333
from poli import objective_factory
3434

35-
# Your alphabet
36-
alphabet = ["", "[C]", ...]
37-
3835
# How to create
3936
problem_info, f, x0, y0, run_info = objective_factory.create(
4037
name="rdkit_logp",
41-
alphabet=alphabet,
42-
string_representation="SELFIES", # it is "SMILES" by default.
38+
string_representation="SELFIES", # Can be either SMILES or SELFIES
4339
force_register=True,
4440
)
4541

@@ -57,21 +53,14 @@ print(f(x)) # Should be close to 0.6361
5753
If you want us to handle dependencies, run
5854

5955
```python
60-
from pathlib import Path
61-
6256
import numpy as np
6357

6458
from poli import objective_factory
6559

66-
67-
# Your alphabet
68-
alphabet = ["", "[C]", ...]
69-
7060
# How to create
7161
problem_info, f, x0, y0, run_info = objective_factory.create(
7262
name="rdkit_logp",
73-
alphabet=alphabet,
74-
string_representation="SELFIES", # it is "SMILES" by default.
63+
string_representation="SELFIES", # Can be either SMILES or SELFIES
7564
force_register=True,
7665
)
7766

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This objective function returns the Quantitative Estimate of Druglikeness (QED)
99

1010
## Prerequisites
1111

12-
- You will need to specify an alphabet `List[str]`.
12+
None. This black box should work out-of-the-box.
1313

1414
## How to run
1515

@@ -31,14 +31,10 @@ Then run
3131
import numpy as np
3232
from poli import objective_factory
3333

34-
# Your alphabet
35-
alphabet = ["", "[C]", ...]
36-
3734
# How to create
3835
problem_info, f, x0, y0, run_info = objective_factory.create(
3936
name="rdkit_qed",
40-
alphabet=alphabet,
41-
string_representation="SELFIES", # it is "SMILES" by default.
37+
string_representation="SELFIES", # Can be either SMILES or SELFIES
4238
force_register=True,
4339
)
4440

@@ -48,7 +44,6 @@ x = np.array(["[C]"]).reshape(1, -1)
4844
# Querying:
4945
y = f(x)
5046
print(y) # Should be close to 0.35978494
51-
assert np.isclose(y, 0.35978494).all()
5247
```
5348

5449
:::
@@ -61,14 +56,11 @@ If you want us to handle dependencies, run
6156
import numpy as np
6257
from poli import objective_factory
6358

64-
# Your alphabet
65-
alphabet = ["", "[C]", ...]
66-
6759
# How to create
6860
problem_info, f, x0, y0, run_info = objective_factory.create(
6961
name="rdkit_qed",
7062
alphabet=alphabet,
71-
string_representation="SELFIES", # it is "SMILES" by default.
63+
string_representation="SELFIES", # Can be either SMILES or SELFIES
7264
force_register=True,
7365
)
7466

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ This can easily be done by running
2121
conda env create --file src/poli/objective_repository/sa_tdc/environment.yml
2222
```
2323

24-
This particular example _doesn't_ need to have the `lambo` package installed.
25-
2624
## How to run
2725

2826
You can only run this objective function either in the `poli__lambo` environment, or as an isolated process (which runs this environment underneath).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ print(f(x)) # Should be [[0.0]] in this example
6262

6363
## Creating problems with low intrinsic dimensionality
6464

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:
65+
Some optimization algorithms (like [LineBO](https://arxiv.org/abs/1902.03229) or [SAASBO](https://proceedings.mlr.press/v161/eriksson21a.html)) 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:
6666

6767
```python
6868
problem_info, f, x0, y0, run_info = objective_factory.create(

0 commit comments

Comments
 (0)