MCPcopy
hub / github.com/dmlc/dgl / __init__

Method __init__

python/dgl/data/adapter.py:273–283  ·  view source on GitHub ↗
(self, dataset, split_ratio=None, neg_ratio=3, **kwargs)

Source from the content-addressed store, hash-verified

271 """
272
273 def __init__(self, dataset, split_ratio=None, neg_ratio=3, **kwargs):
274 self.g = dataset[0]
275 self.num_nodes = self.g.num_nodes()
276 self.dataset = dataset
277 self.split_ratio = split_ratio
278 self.neg_ratio = neg_ratio
279 super().__init__(
280 dataset.name + "-as-linkpred",
281 hash_key=(neg_ratio, split_ratio, dataset.name, "linkpred"),
282 **kwargs
283 )
284
285 def process(self):
286 if self.split_ratio is None:

Callers

nothing calls this directly

Calls 2

num_nodesMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected