GSgnnLinkPredictionPredefinedTestDataLoaderο
- class graphstorm.dataloading.GSgnnLinkPredictionPredefinedTestDataLoader(dataset, target_idx, batch_size, fixed_edge_dst_negative_field, fanout=None, fixed_test_size=None, node_feats=None, edge_feats=None, pos_graph_edge_feats=None)ο
Bases:
GSgnnLinkPredictionTestDataLoaderMini-batch dataloader for link prediction validation and test with predefined negatives.
Parametersο
- dataset: GSgnnData
The GraphStorm data.
- target_idxdict of Tensors
The target edge indexes for link prediction.
- batch_size: int
Mini-batch size.
- fanout: list of int, or dict of list
Neighbor sampling fanout. If itβs a dict of list, it indicates the fanout for each edge type.
- fixed_test_size: int
Fixed number of test data used in evaluation. If it is none, use the whole testset. When test is huge, using fixed_test_size can save validation and test time. Default: None.
- fixed_edge_dst_negative_field: str, or list of str
The feature fields that store the fixed negative set for each edge.
- node_feats: str, or dict of list of str
Node feature fileds in three possible formats:
string: All nodes have the same feature name.
list of string: All nodes have the same list of features.
dict of list of string: Each node type have different set of node features.
Default: None.
- edge_feats: str, or dict of list of str
Edge feature fileds in three possible formats:
string: All edges have the same feature name.
list of string: All edges have the same list of features.
dict of list of string: Each edge type have different set of edge features.
Default: None.
- pos_graph_edge_feats: str, or dict of list of str
The edge feature fields used by positive graph in link prediction. For example edge weight. Default: None.