seqme.utils.plot_knn_alignment_score

seqme.utils.plot_knn_alignment_score#

seqme.utils.plot_knn_alignment_score(xs, labels, n_neighbors, label=None, legend_loc='right margin', figsize=(4, 3), ax=None)[source]#

Plot the k-NN feature alignment score of an embedding model using variable-number of neighbors.

Parameters:
  • xs (ndarray) – Sequence embeddings.

  • labels (ndarray) – Label for each sequence.

  • n_neighbors (list[int]) – Number of neighbors used by k-NN.

  • label (Optional[str]) – Model name.

  • legend_loc (Union[Literal['right margin'], str, None]) – Legend location.

  • figsize (tuple[float, float]) – Size of the figure.

  • ax (Optional[Axes]) – Optional Axes.