Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ API Reference
models/pyhealth.models.CorGAN
models/pyhealth.models.Synthea
models/pyhealth.models.SDOH
models/pyhealth.models.SequenceEmbeddingModel
models/pyhealth.models.VisionEmbeddingModel
models/pyhealth.models.TextEmbedding
models/pyhealth.models.BIOT
Expand Down
18 changes: 18 additions & 0 deletions docs/api/models/pyhealth.models.SequenceEmbeddingModel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pyhealth.models.SequenceEmbeddingModel
======================================

Embeddings for the packed records of ``sequence_v2``
(:class:`~pyhealth.processors.SequenceProcessorV2`) fields. Each level's
records get one embedding per token namespace and a projection of their
values, concatenated; each level keeps its offsets and times.

.. autoclass:: pyhealth.models.SequenceEmbeddingModel
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: pyhealth.models.LevelEmbedding
:members:

.. autoclass:: pyhealth.models.PretrainedEmbedding
:members:
5 changes: 5 additions & 0 deletions pyhealth/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
from .contrawr import ContraWR, ResBlock2D
from .deepr import Deepr, DeeprLayer
from .embedding import EmbeddingModel
from .sequence_embedding import (
LevelEmbedding as LevelEmbedding,
PretrainedEmbedding as PretrainedEmbedding,
SequenceEmbeddingModel as SequenceEmbeddingModel,
)
from .gamenet import GAMENet, GAMENetLayer
from .jamba_ehr import JambaEHR, JambaLayer
from .logistic_regression import LogisticRegression
Expand Down
Loading
Loading