如何可视化word2vec输出?

时间:2019-09-26 12:12:54

标签: python numpy

X = model [model.wv.vocab]


ax0.plot(xpts,ypts,'*',X)


我只想使用numpy绘制word2vec输出。但是不知道如何处理X数组中的xpts,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  ]]

1 个答案:

答案 0 :(得分:0)

尝试一下:

let add = userInfo.address + "," + userInfo.country;
return new Promise((resolve, reject) => {
  geo.find(
    "India",
    (err, res) => {
      if (res) {
        resolve(res);
      }
      if (err) {
        reject(err);
      }
    },
    err => {
      reject(err);
    }
  );
});

希望这会有所帮助!