ggfm.data.metapath_based_corpus_construction¶
- class ggfm.data.metapath_based_corpus_construction(g, graph_node_name, target_type, metapaths, relation, mid_types, labeled_node_idxs, k=2)[source]¶
Bases:
Metapath-based corpus construction.
- Parameters:
g (dgl.heterograph) – Target graph.
graph_node_name (dict) – Node names for each node type.
target_type (str) – Sampled node type.
metapaths (list) – Sampled metapaths for each node type.
relation (list) – Relations for each node type.
mid_types (list) – Midtypes of each node type’s metapaths.
labeled_node_idxs (list) – Sampled node indexes for the target node type.
k (int, optional) – Number of samples retained for each metapath sampling。 (default:
2)