seqme.utils.tsne

Contents

seqme.utils.tsne#

seqme.utils.tsne(embeddings, seed=0)[source]#

Project embeddings into 2D using t-SNE.

Parameters:
  • embeddings (ndarray | list[ndarray]) – 2D array where each row is a data point or list.

  • seed (int | None) – Seed for deterministic computation of t-SNE.

Return type:

ndarray | list[ndarray]

Returns:

2D array of shape (n_samples, 2) or list.

Notes

t-SNE is a nonlinear technique that preserves local neighborhood structure by minimizing KL-divergence between high-dimensional and low-dim similarity distributions.