diff --git a/docs/about_sceptr.png b/docs/about_sceptr.png new file mode 100644 index 0000000..fb996c1 Binary files /dev/null and b/docs/about_sceptr.png differ diff --git a/docs/index.rst b/docs/index.rst index 730e31b..e02e573 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,15 @@ And if your computer does have a `CUDA-enabled GPU ` exposes three intuitive functions: :py:func:`~sceptr.calc_vector_representations`, :py:func:`~sceptr.calc_cdist_matrix`, and :py:func:`~sceptr.calc_pdist_vector`-- and it's all you need to make full use of the SCEPTR models. What's even better is that they are fully compliant with `pyrepseq `_'s `tcr_metric `_ API, so sceptr will fit snugly into the rest of your repertoire analysis toolkit. +.. figure:: about_sceptr.png + :width: 700px + :alt: Schematic diagrams showing a visual introduction to the architecture of SCEPTR, as well as how it was trained-- namely, autocontrastive learning and masked-language modelling. + + A visual introduction to how SCEPTR works, taken from our SCEPTR preprint. + SCEPTR is a TCR language model (a,b) pre-trained using masked-language modelling and autocontrastive learning (c,d). + (a) The default model uses the ```` pooling method, but there is also a variant that is trained to use average-pooling (see :py:func:`sceptr.variant.average_pooling`). + Please see the manuscript for more details. + .. toctree:: :maxdepth: 2 :caption: Contents: diff --git a/src/sceptr/__init__.py b/src/sceptr/__init__.py index 88537a7..92f9593 100644 --- a/src/sceptr/__init__.py +++ b/src/sceptr/__init__.py @@ -45,7 +45,7 @@ def calc_pdist_vector(instances: DataFrame) -> ndarray: Returns ------- ndarray - A 2D numpy ndarray representing a pdist vector of distances between each pair of TCRs in `instances`. + A 1D numpy ndarray representing a pdist vector of distances between each pair of TCRs in `instances`. The returned array will have shape :math:`(\frac{1}{2}N(N-1),)`, where :math:`N` is the number of TCRs in `instances`. """ return get_default_model().calc_pdist_vector(instances) diff --git a/src/sceptr/model.py b/src/sceptr/model.py index 1f7c7fa..23bae7d 100644 --- a/src/sceptr/model.py +++ b/src/sceptr/model.py @@ -115,7 +115,7 @@ def calc_pdist_vector(self, instances: DataFrame) -> ndarray: Returns ------- ndarray - A 2D numpy ndarray representing a pdist vector of distances between each pair of TCRs in `instances`. + A 1D numpy ndarray representing a pdist vector of distances between each pair of TCRs in `instances`. The returned array will have shape :math:`(\frac{1}{2}N(N-1),)`, where :math:`N` is the number of TCRs in `instances`. """ representations = self._calc_torch_representations(instances)