0

I've created a word2vec model, that saves the information into a normal .txt file. And of cause, it return a lot of vector, but when i delete the content in the .txt file and run the program again, the output will change. Do you know why? It is not very important, it just kills my OCD.

Quick example
1:

[[ 3.2392807   1.680171   -0.42155528 -1.7102437   2.3303537 ]
 [ 3.6736202  -0.8065518   0.26261634 -1.2047065   2.1221237 ]
 [ 2.9144292   0.44492996  1.237786   -0.3242629   3.5435572 ]
 [ 0.4130354   0.08011961  0.03255951 -0.11589962  2.9328532 ]
 [ 1.5287857  -0.6961181   2.7903285   0.40642017  0.6555253 ]
 [ 2.9975677  -0.977857    1.883217   -1.3727202   1.832796  ]
 [ 3.2535048   0.86906517  1.748935   -1.0769477   1.100436  ]
 [ 2.509191   -0.59611416  2.0518627  -0.8840636   1.6848307 ]
 [ 2.7653887  -0.7883314   0.943277   -1.005442    2.115393  ]
 [ 0.95081985 -0.865088    0.90458965 -0.04385343  1.3649719 ]]

2:

[[ 1.60327232e+00  2.12096125e-01  1.26251602e+00 -7.17208505e-01
  -6.12632275e-01]
 [ 8.19391370e-01  9.68442023e-01 -2.48031616e-01  3.76854181e-01
   7.21971035e-01]
 [ 1.12308228e+00  2.55824924e-02  4.91404593e-01  8.79842639e-01
   1.54288793e+00]
 [-1.69641733e-01  7.46692896e-01 -4.85606074e-01  1.64707148e+00
   2.71568203e+00]
 [-3.10868084e-01  2.13060689e+00  2.07112730e-01  5.34646988e-01
   3.51558208e-01]
 [ 2.30190897e+00  1.47751641e+00  6.27250433e-01  1.55146813e+00
  -8.13818634e-01]
 [ 1.45050168e+00  4.62597281e-01  2.21269965e+00 -5.63119173e-01
  -1.97888732e-01]
 [-8.21502864e-01  2.41197419e+00  9.84819829e-01 -2.05534548e-01
   1.30428791e-01]
 [ 3.31903785e-01 -2.34199071e+00  3.95457715e-01  9.19164062e-01
  -8.65327239e-01]
 [ 5.92819750e-01  1.58047271e+00  1.58888444e-01  3.54782730e-01
   3.13017368e-01]
 [ 1.67989731e-03  7.24929124e-02 -2.14633882e-01 -3.33887011e-01
  -2.00998139e+00]
 [ 1.49949551e+00  6.67065024e-01  2.81557608e+00 -1.20027995e+00
  -2.41783738e+00]
 [ 7.21774340e-01 -4.06250358e-01  6.79239750e-01  7.13694572e-01
   2.15337336e-01]]
  • This has been answerer in [Ensure the gensim generate the same Word2Vec model for different runs on the same data](https://stackoverflow.com/questions/34831551/ensure-the-gensim-generate-the-same-word2vec-model-for-different-runs-on-the-sam) – yatu Dec 27 '18 at 15:06
  • This has also been answered in the gensim FAQ: "I've trained my Word2Vec/Doc2Vec/etc model repeatedly using the exact same text corpus, but the vectors are different each time. Is there a bug or have I made a mistake? (*2vec training non-determinism)" https://github.com/RaRe-Technologies/gensim/wiki/recipes-&-faq#q11-ive-trained-my-word2vecdoc2vecetc-model-repeatedly-using-the-exact-same-text-corpus-but-the-vectors-are-different-each-time-is-there-a-bug-or-have-i-made-a-mistake-2vec-training-non-determinism – gojomo Dec 27 '18 at 18:19

0 Answers0