diff --git a/doc/api.rst b/doc/api.rst index 4b223ca53824abd5707cee134e792820c7c08d84..e166ddbe5fbedce84c4f2c3876dfbdfaf0239469 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -45,6 +45,7 @@ CNN and other models implemented. ptbench.models.normalizer ptbench.models.logistic_regression ptbench.models.mlp + ptbench.models.typing .. _ptbench.api.engines: @@ -76,17 +77,9 @@ Reusable auxiliary functions. :toctree: api/utils ptbench.utils.checkpointer - ptbench.utils.download - ptbench.utils.grad_cams - ptbench.utils.image - ptbench.utils.measure - ptbench.utils.model_serialization - ptbench.utils.model_zoo - ptbench.utils.plot ptbench.utils.rc ptbench.utils.resources ptbench.utils.summary - ptbench.utils.table ptbench.utils.tensorboard diff --git a/doc/catalog.json b/doc/catalog.json index 6c65691e90743e6d8c5ad405902b6a9e494a1c88..c837093f96ae2e8cd85cbfa6af52af7100e7e7f3 100644 --- a/doc/catalog.json +++ b/doc/catalog.json @@ -13,5 +13,15 @@ "sources": { "environment": "lightning" } + }, + "tabulate": { + "versions": { + "latest": "https://tabulate.readthedocs.io/en/latest/", + "master": "https://tabulate.readthedocs.io/en/master/", + "stable": "https://tabulate.readthedocs.io/en/stable/" + }, + "sources": { + "readthedocs": "tabulate" + } } } diff --git a/doc/references.rst b/doc/references.rst index 056707406d9e3dbf5d73fe5bc03cdd7f49701cbb..d8758df81cf5a8bfdf714be7f060abbf6cd70125 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -43,11 +43,6 @@ Volume 66, 2020, 101797, ISSN 1361-8415. doi: 10.1016/j.media.2020.101797. https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614 -.. [GOUTTE-2005] *C. Goutte and E. Gaussier*, **A probabilistic interpretation - of precision, recall and F-score, with implication for evaluation**, - European conference on Advances in Information Retrieval Research, 2005. - https://doi.org/10.1007/978-3-540-31865-1_25 - .. [TB-POC-2018] *Griesel, Rulan and Stewart, Annemie and van der Plas, Helen and Sikhondze, Welile and Rangaka, Molebogeng X and Nicol, Mark P and Kengne, Andre P and Mendelson, Marc and Maartens, Gary*, **Optimizing diff --git a/src/ptbench/engine/evaluator.py b/src/ptbench/engine/evaluator.py index 8df2b58067585604cf9ed2b4bb1497ce296eabd1..8c1a8d843b542b8c8ecefb4496614d8df1a5ca62 100644 --- a/src/ptbench/engine/evaluator.py +++ b/src/ptbench/engine/evaluator.py @@ -30,7 +30,7 @@ def eer_threshold(predictions: Iterable[BinaryPrediction]) -> float: ---------- predictions An iterable of multiple - :py:data:`ptbench.models.typing.BinaryPrediction`'s. + :py:data:`.models.typing.BinaryPrediction`'s. Returns @@ -86,7 +86,7 @@ def maxf1_threshold(predictions: Iterable[BinaryPrediction]) -> float: ---------- predictions An iterable of multiple - :py:data:`ptbench.models.typing.BinaryPrediction`'s. + :py:data:`.models.typing.BinaryPrediction`'s. Returns @@ -279,8 +279,8 @@ def aggregate_summaries( ) -> str: """Tabulates summaries from multiple splits. - This function can properly :py:mod:`tabulate` the various summaries - produced for all the splits in a prediction database. + This function can properly tabulate the various summaries produced for all + the splits in a prediction database. Parameters @@ -288,7 +288,8 @@ def aggregate_summaries( data An iterable over all summary data collected fmt - One of the formats supported by :py:mod:`tabulate`. + One of the formats supported by `python-tabulate + <https://pypi.org/project/tabulate/>`_. Returns diff --git a/src/ptbench/models/typing.py b/src/ptbench/models/typing.py index 6290315724d5e5fcd8f3a1d435771473838220e3..3eb9017c1e7bbbf860cf7be67622cdfe5db513df 100644 --- a/src/ptbench/models/typing.py +++ b/src/ptbench/models/typing.py @@ -9,12 +9,12 @@ Checkpoint: typing.TypeAlias = typing.MutableMapping[str, typing.Any] """Definition of a lightning checkpoint.""" BinaryPrediction: typing.TypeAlias = tuple[str, int, float] -"""Prediction: the sample name, the target, and the predicted value.""" +"""The sample name, the target, and the predicted value.""" MultiClassPrediction: typing.TypeAlias = tuple[ str, typing.Sequence[int], typing.Sequence[float] ] -"""Prediction: the sample name, the target, and the predicted value.""" +"""The sample name, the target, and the predicted value.""" BinaryPredictionSplit: typing.TypeAlias = typing.Mapping[ str, typing.Sequence[BinaryPrediction]