How does gensim calculate doc2vec paragraph vectors

前端 未结 2 2050
独厮守ぢ
独厮守ぢ 2021-02-13 04:06

i am going thorugh this paper http://cs.stanford.edu/~quocle/paragraph_vector.pdf

and it states that

\" Theparagraph vector and word vectors are a

相关标签:
2条回答
  • 2021-02-13 04:28

    A simple (and sometimes useful) vector for a range of text is the sum or average of the text's words' vectors – but that's not what the 'Paragraph Vector' of the 'Paragraph Vectors' paper is.

    Rather, the Paragraph Vector is another vector, trained similarly to the word vectors, which is also adjusted to help in word-prediction. These vectors are combined (or interleaved) with the word vectors to feed the prediction model. That is, the averaging (in DM mode) includes the PV alongside word-vectors - it doesn't compose the PV from word-vectors.

    In the diagram, on is the target-word being predicted, in that diagram by a combination of closely-neighboring words and the full-example's PV, which may perhaps be informally thought of as a special pseudoword, ranging over the entire text example, participating in all the sliding 'windows' of real words.

    0 讨论(0)
  • 2021-02-13 04:29

    How does concatenation or averaging work?

    You got it right for the average. The concatenation is: [0.1,0.2,0.3,0.4,0.5,0.6].

    Is the paragraph token equal to the paragraph vector which is equal to on?

    The "paragraph token" is mapped to a vector that is called "paragraph vector". It is different from the token "on", and different from the word vector that the token "on" is mapped to.

    0 讨论(0)
提交回复
热议问题