plot_pair_similarity

torchhd.utils.plot_pair_similarity(memory: Tensor, ax=None, **kwargs)[来源]

绘制超向量集的成对相似性。

Parameters:
  • memory (Tensor) – 一组 \(n\) 超向量,其两两相似性将被展示。

  • ax (matplotlib.axes, 可选) – 用于绘制图表的坐标轴。

  • **kwargsmatplotlib.axes.Axes.pcolormesh 参数。

Returns:

matplotlib.collections.QuadMesh.

Return type:

matplotlib.collections.QuadMesh

Shapes:
  • 内存:\((n, d)\)

示例:

>>>  import matplotlib.pyplot as plt
>>>  hv = torchhd.level(10, 10000)
>>>  utils.plot_pair_similarity(hv)
>>>  plt.show()