openprotein.umap#
Fit and transform your embeddings using UMAP to help visualize your embeddings.
Endpoints#
- class openprotein.umap.UMAPAPI[source]#
UMAP API providing the interface to fit and run UMAP visualizations.
- __init__(session)[source]#
- Parameters:
session (APISession)
- fit_umap(model, feature_type=None, sequences=None, assay=None, n_components=2, reduction=None, **kwargs)[source]#
Fit an UMAP on the sequences with the specified model_id and hyperparameters (n_components).
- Parameters:
model_id (str) – The ID of the model to fit the UMAP on.
sequences (list[bytes]) – The list of sequences to use for the UMAP fitting.
n_components (int, optional) – The number of components for the UMAP, by default 2.
reduction (str, optional) – The reduction method to apply to the embeddings, by default None.
model (EmbeddingModel | SVDModel | str)
feature_type (FeatureType | None)
assay (AssayDataset | None)
- Returns:
The model with the UMAP fit.
- Return type:
- class openprotein.umap.UMAPModel[source]#
Class providing embedding endpoint for UMAP models. Also allows retrieving embeddings of sequences used to fit the UMAP with get. Implements a Future to allow waiting for a fit job.
- job: UMAPFitJob#
- __init__(session, job=None, metadata=None)[source]#
Initializes with either job get or umap metadata get.
- Parameters:
session (APISession)
job (UMAPFitJob | None)
metadata (UMAPMetadata | None)
- property id#
- property n_components#
- property n_neighbors#
- property min_dist#
- property sequence_length#
- property reduction#
- property metadata#
- property sequences#
- property embeddings#
- property model: EmbeddingModel#