MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / Hyperlink2012

Class Hyperlink2012

python/graphvite/dataset.py:488–518  ·  view source on GitHub ↗

Hyperlink 2012 graph dataset. Splits: pld_train, pld_test

Source from the content-addressed store, hash-verified

486
487
488class Hyperlink2012(Dataset):
489 """
490 Hyperlink 2012 graph dataset.
491
492 Splits:
493 pld_train, pld_test
494 """
495 def __init__(self):
496 super(Hyperlink2012, self).__init__(
497 "hyperlink2012",
498 urls={
499 "pld_train": "http://data.dws.informatik.uni-mannheim.de/hyperlinkgraph/2012-08/pld-arc.gz",
500 "pld_valid": "http://data.dws.informatik.uni-mannheim.de/hyperlinkgraph/2012-08/pld-arc.gz",
501 "pld_test": "http://data.dws.informatik.uni-mannheim.de/hyperlinkgraph/2012-08/pld-arc.gz"
502 }
503 )
504
505 def pld_train_preprocess(self, graph_file, train_file):
506 valid_file = train_file[:train_file.rfind("pld_train.txt")] + "pld_valid.txt"
507 test_file = train_file[:train_file.rfind("pld_train.txt")] + "pld_test.txt"
508 self.link_prediction_split(graph_file, [train_file, valid_file, test_file], portions=[10000, 1, 1])
509
510 def pld_valid_preprocess(self, graph_file, valid_file):
511 train_file = valid_file[:valid_file.rfind("pld_valid.txt")] + "pld_train.txt"
512 test_file = valid_file[:valid_file.rfind("pld_valid.txt")] + "pld_test.txt"
513 self.link_prediction_split(graph_file, [train_file, valid_file, test_file], portions=[10000, 1, 1])
514
515 def pld_test_preprocess(self, graph_file, test_file):
516 train_file = test_file[:test_file.rfind("pld_test.txt")] + "pld_train.txt"
517 valid_file = test_file[:test_file.rfind("pld_test.txt")] + "pld_valid.txt"
518 self.link_prediction_split(graph_file, [train_file, valid_file, test_file], portions=[10000, 1, 1])
519
520
521class Friendster(Dataset):

Callers 1

dataset.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected