piskvorky/gensim — pull request #224 by gojomo (2014-07-30 13:31:49+00:00)
Title: multiplicative objective ('3CosMul') of Levy & Goldberg

`most_similar_cosmul`: ranked words according to the multiplicative objective ('3CosMul') of Levy & Goldberg ("Linguistic Regularities in Sparse and Explicit Word Representations", 2014). May be tested in preference to default `most_similar` by passing as optional `most_similar` argument to `accuracy`, eg:

>>> trained_model.accuracy("questions-words.txt",restrict_vocab=300000,most_similar=word2vec.Word2Vec.most_similar_cosmul)

With training set similar to that in their paper (recent English Wikipedia full text), the objective gives 3-4 percentage point improvement on question-words.txt analogies task, but at cost of slightly more than 2X slowdown.