{"action":"created","issue":{"url":"https://api.github.com/repos/piskvorky/gensim/issues/467","labels_url":"https://api.github.com/repos/piskvorky/gensim/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/piskvorky/gensim/issues/467/comments","events_url":"https://api.github.com/repos/piskvorky/gensim/issues/467/events","html_url":"https://github.com/piskvorky/gensim/issues/467","id":108527206,"number":467,"title":"Word2Vec Iterations and Phrases","user":{"login":"quhfus","id":4997679,"avatar_url":"https://avatars.githubusercontent.com/u/4997679?v=3","gravatar_id":"","url":"https://api.github.com/users/quhfus","html_url":"https://github.com/quhfus","followers_url":"https://api.github.com/users/quhfus/followers","following_url":"https://api.github.com/users/quhfus/following{/other_user}","gists_url":"https://api.github.com/users/quhfus/gists{/gist_id}","starred_url":"https://api.github.com/users/quhfus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quhfus/subscriptions","organizations_url":"https://api.github.com/users/quhfus/orgs","repos_url":"https://api.github.com/users/quhfus/repos","events_url":"https://api.github.com/users/quhfus/events{/privacy}","received_events_url":"https://api.github.com/users/quhfus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-27T10:14:23Z","updated_at":"2015-09-27T18:19:10Z","closed_at":null,"body":"When learning a word2vec model (e.g. on Wikipedia), how many iteration are recommended? Is one iteration enough? Does this depend on the given data set? This brings me to another question related to gensim. I recently learned a word2vec model by using: \r\n\r\n    model = gensim.models.Word2Vec(sentences=corpus, size=500, window=8, min_count=3, workers=25, sample=1e-4, iter=5)\r\n\r\nHowever, there was only one iteration from 0 to 100% during the learning phase. The \"iter=5\" parameter should be correct. Is this a problem on my side?\r\n\r\nMy second question is about phrases. In the original c word2vec code, when using vectors-phrase.bin, the implementation learns a word2vec model containing not only words but also some phrases (e.g. san_francisco). As far as I understand the procedure, the phrases within the sentences are learned first and afterwards the word2vec model is learned with these phrases.\r\nWhen I want to do the same with the gensim implementation, what do I have to do? \r\n\r\nI guess the following:\r\n1. using gensim.model.Phrases(sentences) to create a phrase model.\r\n2. replacing all bigrams, trigrams,... of my word2vec corpus with those learned in procedure 1.\r\n3. learn the word2vec model\r\n\r\nBasically, this is not too complicated but does gensim offer a function which combines these steps?  "},"comment":{"url":"https://api.github.com/repos/piskvorky/gensim/issues/comments/143582209","html_url":"https://github.com/piskvorky/gensim/issues/467#issuecomment-143582209","issue_url":"https://api.github.com/repos/piskvorky/gensim/issues/467","id":143582209,"user":{"login":"gojomo","id":1641,"avatar_url":"https://avatars.githubusercontent.com/u/1641?v=3","gravatar_id":"","url":"https://api.github.com/users/gojomo","html_url":"https://github.com/gojomo","followers_url":"https://api.github.com/users/gojomo/followers","following_url":"https://api.github.com/users/gojomo/following{/other_user}","gists_url":"https://api.github.com/users/gojomo/gists{/gist_id}","starred_url":"https://api.github.com/users/gojomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gojomo/subscriptions","organizations_url":"https://api.github.com/users/gojomo/orgs","repos_url":"https://api.github.com/users/gojomo/repos","events_url":"https://api.github.com/users/gojomo/events{/privacy}","received_events_url":"https://api.github.com/users/gojomo/received_events","type":"User","site_admin":false},"created_at":"2015-09-27T18:19:10Z","updated_at":"2015-09-27T18:19:10Z","body":"For iterations, there's no right answer: whatever works with your data. Smaller datasets are more likely to benefit from more iterations. \r\n\r\nThe percentage completion estimate is based on the known total amount of training (including all iterations). Did the sentence/example counts shown at the end match 5x your original dataset? \r\n\r\nYes, you must apply the Phrases steps yourself, then send the transformed corpus to Word2Vec. \r\n\r\nIn the future, it's better to ask such usage questions (not involving a certain bug or new-feature-request) on the project discussion forum: https://groups.google.com/forum/#!forum/gensim"}}