The Metapath2vec model from the `”metapath2vec: Scalable Representation
Metapath2vec(dimension, walk_length, walk_num, window_size, worker, iteration, schema)¶
The Metapath2vec model from the “metapath2vec: Scalable Representation Learning for Heterogeneous Networks” paper
hidden_size (int) : The dimension of node representation. walk_length (int) : The walk length. walk_num (int) : The number of walks to sample for each node. window_size (int) : The actual context size which is considered in language model. worker (int) : The number of workers for word2vec. iteration (int) : The number of training iteration in word2vec. schema (str) : The metapath schema used in model. Metapaths are splited with “,”, while each node type are connected with “-” in each metapath. For example:”0-1-0,0-2-0,1-0-2-0-1”.
Add model-specific arguments to the parser.
Build a new model instance.
train(self, G, node_type)¶
_walk(self, start_node, walk_length, schema=None)¶
_simulate_walks(self, walk_length, num_walks, schema='No')¶