如何可视化word2vec输出?

2024-07-05 09:08:14 发布

您现在位置:Python中文网/ 问答频道 /正文

X=型号[model.wv.vocab]


ax0.plot(xpts,ypts,“*”,X)


我只想用numpy绘制这个word2vec输出。但不知道如何处理xpts,X数组中的ypts

输出(X):

[[-0.03848222 -0.03612062  0.00217602 -0.00959375 -0.00433034 -0.0316275 0.01694106 -0.00831801 -0.00622396  0.04329012]
 [-0.00848787 -0.04294299 -0.0176574  -0.02500241  0.00836717  0.03233737 0.02226903 -0.03964857  0.0381722  -0.0259253 ]
 [-0.03853661  0.00317388  0.00614037  0.04335376 -0.00771708 -0.01196922 0.0120947  -0.02529554  0.00420415  0.021986  ]]

Tags: numpymodelplot绘制word2vec数组型号vocab