tomodrgn.analysis.run_tsne#

run_tsne(z: ndarray, n_components: int = 2, perplexity: int = 1000, random_state: int | RandomState | None = None, **kwargs: Any) ndarray[source]#

Run t-SNE dimensionality reduction on latent embeddings.

Parameters:
  • z – array of latent embeddings, shape (nptcls, zdim)

  • n_components – number of dimensions in the embedded t-SNE space, passed to sklearn.manifold.TSNE

  • perplexity – related to the number of nearest neighbors that is used in other manifold learning algorithms, passed to sklearn.manifold.TSNE

  • random_state – random state for reproducible runs, passed to sklearn.manifold.TSNE

  • kwargs – additional key word arguments passed to sklearn.manifold.TSNE

Returns:

array of t-SNE embeddings, shape (len(z), n_components)