The most frequent words, such as 'the', carry little information and dominate the training pairs. Word2vec discards some of their occurrences at random, which speeds up training and improves the quality of the rarer words.
Implement subsample_keep_prob(freq, t), returning the probability of keeping an occurrence, capped at 1.
t is usually around 1e-5 to 1e-4.Compute sqrt(t / freq) and take the minimum with 1.
No results yet
Run your code to check it against the examples, or submit to run every test.