SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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, int& Dimensions, int& WinSize,
6  int& Iter, bool& Verbose, TIntFltVH& EmbeddingsHV);
7 
8 //Max x for e^x. Value taken from original word2vec code.
9 const int MaxExp = 6;
10 
11 //Size of e^x precomputed table.
12 const int ExpTablePrecision = 10000;
14 
15 //Number of negative samples. Value taken from original word2vec code.
16 const int NegSamN = 5;
17 
18 //Learning rate for SGD. Value taken from original word2vec code.
19 const double StartAlpha = 0.025;
20 
21 #endif //WORD_2_VEC_H
const int MaxExp
Definition: word2vec.h:9
void LearnEmbeddings(TVVec< TInt, int64 > &WalksVV, int &Dimensions, int &WinSize, int &Iter, bool &Verbose, TIntFltVH &EmbeddingsHV)
Learns embeddings using SGD, Skip-gram with negative sampling.
Definition: word2vec.cpp:148
Definition: ds.h:2222
const double StartAlpha
Definition: word2vec.h:19
Definition: hash.h:97
const int ExpTablePrecision
Definition: word2vec.h:12
const int TableSize
Definition: word2vec.h:13
const int NegSamN
Definition: word2vec.h:16