0

I am running a UMAP model as follows:

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

And plotting:

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

This generates a nice looking graph. I'd like to get the coordinates of the points plotted, to move to a different visualisation. I don't fully understand what is stored in the embedding object.

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

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

还是类似的?

4

1 回答 1

0

您可以通过执行获取 x,y 坐标数组

    embedding.embedding_

不知道我是怎么错过的。

于 2021-09-01T13:51:06.263 回答