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
Main Page
Namespaces
Classes
Files
File List
File Members
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;
13
const
int
TableSize
=
MaxExp
*
ExpTablePrecision
*2;
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
MaxExp
const int MaxExp
Definition:
word2vec.h:9
LearnEmbeddings
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
TVVec
Definition:
ds.h:2222
StartAlpha
const double StartAlpha
Definition:
word2vec.h:19
THash
Definition:
hash.h:97
ExpTablePrecision
const int ExpTablePrecision
Definition:
word2vec.h:12
TableSize
const int TableSize
Definition:
word2vec.h:13
NegSamN
const int NegSamN
Definition:
word2vec.h:16
snap-adv
word2vec.h
Generated on Thu Jul 27 2017 13:18:10 for SNAP Library 4.0, Developer Reference by
1.8.7