【问题标题】:Can I save the coordinates for a UMAP embedding?我可以保存 UMAP 嵌入的坐标吗?
【发布时间】:2021-09-01 01:39:44
【问题描述】:

我正在运行如下 UMAP 模型:

    embedding = umap.UMAP(n_components=2,n_neighbors=30, min_dist=0.0, metric='euclidean').fit(data)

和绘图:

    f = umap.plot.points(embedding, labels=df['name'])

这会生成一个漂亮的图表。我想获得绘制点的坐标,以移动到不同的可视化。我不完全理解嵌入对象中存储的内容。

有没有办法可以导出到类似的东西:

    [{'name': name1, 'x-value': x1, 'y-value': y1}, {'name': name2, 'x-value': x2, 'y-value': y2 }...] 

还是类似的?

【问题讨论】:

    标签: python dimensionality-reduction runumap


    【解决方案1】:

    你可以通过做得到一个 x,y 坐标的数组

        embedding.embedding_
    

    不知道我是怎么错过的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-15
      • 1970-01-01
      • 2011-02-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多