incerto.shift.plot_embedding_space

incerto.shift.plot_embedding_space#

incerto.shift.plot_embedding_space(ref_emb, test_emb, method='tsne', show=True)[source]#

Visualize reference and test embeddings in 2D space.

Parameters:
  • ref_emb (Tensor) – Reference embeddings of shape (n, d)

  • test_emb (Tensor) – Test embeddings of shape (m, d)

  • method (str) – Dimensionality reduction method (‘tsne’ or ‘pca’)

  • show (bool) – Whether to call plt.show() (default: True)

Return type:

Figure

Returns:

The matplotlib Figure object for further customization

Raises:

ValueError – If method is not ‘tsne’ or ‘pca’