Skip to content

Commit 562cef1

Browse files
committed
Update documentation per PR review
1 parent b5da8ec commit 562cef1

File tree

3 files changed

+80
-74
lines changed

3 files changed

+80
-74
lines changed

skfp/datasets/moleculeace/benchmark.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ def load_moleculeace_benchmark(
189189
References
190190
----------
191191
.. [1] `D. van Tilborg, A. Alenicheva, and F. Grisoni
192-
Exposing the Limitations of Molecular Machine Learning with Activity Cliffs
192+
"Exposing the Limitations of Molecular Machine Learning with Activity Cliffs"
193193
Journal of Chemical Information and Modeling, vol. 62, no. 23, pp. 5938–5951, Dec. 2022.
194194
<https://doi.org/10.1021/acs.jcim.2c01073>`_
195195
196196
.. [2] `B. Zdrazil et al.
197-
The ChEMBL Database in 2023: a drug discovery platform spanning multiple bioactivity data types and time periods,”
197+
"The ChEMBL Database in 2023: a drug discovery platform spanning multiple bioactivity data types and time periods"
198198
Nucleic Acids Research, vol. 52, no. D1, Nov. 2023.
199199
<https://doi.org/10.1093/nar/gkad1004>`_
200200
"""
@@ -272,7 +272,7 @@ def load_moleculeace_dataset(
272272
References
273273
----------
274274
.. [1] `D. van Tilborg, A. Alenicheva, and F. Grisoni
275-
Exposing the Limitations of Molecular Machine Learning with Activity Cliffs
275+
"Exposing the Limitations of Molecular Machine Learning with Activity Cliffs"
276276
Journal of Chemical Information and Modeling, vol. 62, no. 23, pp. 5938–5951, Dec. 2022.
277277
<https://doi.org/10.1021/acs.jcim.2c01073>`_
278278
@@ -308,7 +308,7 @@ def load_moleculeace_splits(
308308
Load pre-generated dataset splits for the MoleculeACE benchmark.
309309
310310
MoleculeACE [1]_ provides two stratified split types based on activity-cliff membership.
311-
The data are split into train/test partitions:
311+
The data are split into train/test partitions as one of:
312312
313313
* ``random``
314314
* ``activity_cliff``
@@ -350,13 +350,19 @@ def load_moleculeace_splits(
350350
References
351351
----------
352352
.. [1] `D. van Tilborg, A. Alenicheva, and F. Grisoni
353-
Exposing the Limitations of Molecular Machine Learning with Activity Cliffs
353+
"Exposing the Limitations of Molecular Machine Learning with Activity Cliffs"
354354
Journal of Chemical Information and Modeling, vol. 62, no. 23, pp. 5938–5951, Dec. 2022.
355355
<https://doi.org/10.1021/acs.jcim.2c01073>`_
356356
"""
357-
splits_suffix = {"random": "splits.json", "activity_cliff": "splits_activity.json"}[
358-
split_type
359-
]
357+
if split_type == "random":
358+
splits_suffix = "splits.json"
359+
elif split_type == "activity_cliff":
360+
splits_suffix = "splits_activity.json"
361+
else:
362+
raise ValueError(
363+
f'Split type "{split_type}" not recognized, must be one of: '
364+
f'{{"random", "activity_cliff"}}'
365+
)
360366

361367
splits = fetch_splits(
362368
data_dir,

0 commit comments

Comments
 (0)