H2GB.encoder.MetapathNodeEncoder

class MetapathNodeEncoder(dim_emb, dataset, reshape_x=True)[source]

Bases: HeteroPENodeEncoder

Metapath2Vec based node encoder, based on the MetaPath2Vec model from the “metapath2vec: Scalable Representation Learning for Heterogeneous Networks” paper where random walks based on a given metapath are sampled in a heterogeneous graph, and node embeddings are learned via negative sampling optimization.