SNAP Library 6.0, User Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
word2vec.h
Go to the documentation of this file.
1 #ifndef WORD_2_VEC_H
2 #define WORD_2_VEC_H
3 
5 void LearnEmbeddings(TVVec<TInt, int64>& WalksVV, const int& Dimensions,
6  const int& WinSize, const int& Iter, const bool& Verbose,
7  TIntFltVH& EmbeddingsHV);
8 
9 //Max x for e^x. Value taken from original word2vec code.
10 const int MaxExp = 6;
11 
12 //Size of e^x precomputed table.
13 const int ExpTablePrecision = 10000;
15 
16 //Number of negative samples. Value taken from original word2vec code.
17 const int NegSamN = 5;
18 
19 //Learning rate for SGD. Value taken from original word2vec code.
20 const double StartAlpha = 0.025;
21 
22 #endif //WORD_2_VEC_H
void LearnEmbeddings(TVVec< TInt, int64 > &WalksVV, const int &Dimensions, const int &WinSize, const int &Iter, const bool &Verbose, TIntFltVH &EmbeddingsHV)
Learns embeddings using SGD, Skip-gram with negative sampling.
Definition: word2vec.cpp:160
const int MaxExp
Definition: word2vec.h:10
Definition: ds.h:2223
const double StartAlpha
Definition: word2vec.h:20
Definition: hash.h:97
const int ExpTablePrecision
Definition: word2vec.h:13
const int TableSize
Definition: word2vec.h:14
const int NegSamN
Definition: word2vec.h:17