What is the correct definition of window size for Word2Vec (CBOW and Skip-gram)?

Which one is the correct definition of the window size in Word2Vec (CBOW and Skip-gram)?

After examining multiple resources on how Word2Vec (CBOW and Skip-gram) works, I discovered that there are two ways in which people define the window size:

The window size is represented by an integer, indicating the number of words before or after the target word (excluding the target word itself). For example, with a window size of 3: "The quick brown fox jumps over the lazy dog." (Resource: https://www.tensorflow.org/tutorials/text/word2vec)

The window size is represented by an integer, indicating the number of words before and after the target word, including the target word itself. For example, with a window size of 3: "The quick brown fox jumps over the lazy dog." (Resource: http://jalammar.github.io/illustrated-word2vec/)

Which one is correct and why?



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations