tomodrgn.convergence.plot_latent_umap#

plot_latent_umap(workdir: str, outdir: str, plot_format: Literal['png', 'svg'], epochs: ndarray, nptcls: int, subset: int | None = 50000, random_seed: int | RandomState | None = 42, random_state: int | None = 42) None[source]#

Calculates, plots, and saves UMAP embeddings of subset of particles’ selected epochs’ latent encodings

Parameters:
  • workdir – path to directory containing tomodrgn training results

  • outdir – path to base directory to save outputs

  • plot_format – file format with which to save plots

  • epochs – array of epochs for which to calculate UMAPs

  • nptcls – number of particles in dataset

  • subset – size of subset on which to calculate umap, None means all

  • random_seed – seed for random selection of subset particles with numpy

  • random_state – random state seed used by UMAP for reproducibility at slight cost of performance (None means faster but non-reproducible)

Returns:

None