Friendster social network dataset. Splits: graph, small_graph, label
| 519 | |
| 520 | |
| 521 | class Friendster(Dataset): |
| 522 | """ |
| 523 | Friendster social network dataset. |
| 524 | |
| 525 | Splits: |
| 526 | graph, small_graph, label |
| 527 | """ |
| 528 | def __init__(self): |
| 529 | super(Friendster, self).__init__( |
| 530 | "friendster", |
| 531 | urls={ |
| 532 | "graph": "https://snap.stanford.edu/data/bigdata/communities/com-friendster.ungraph.txt.gz", |
| 533 | "small_graph": ["https://snap.stanford.edu/data/bigdata/communities/com-friendster.ungraph.txt.gz", |
| 534 | "https://snap.stanford.edu/data/bigdata/communities/com-friendster.all.cmty.txt.gz"], |
| 535 | "label": "https://snap.stanford.edu/data/bigdata/communities/com-friendster.top5000.cmty.txt.gz" |
| 536 | } |
| 537 | ) |
| 538 | |
| 539 | def small_graph_preprocess(self, graph_file, label_file, save_file): |
| 540 | self.induced_graph(graph_file, label_file, save_file) |
| 541 | |
| 542 | def label_preprocess(self, label_file, save_file): |
| 543 | self.top_k_label(label_file, save_file, k=100, format="(label)-nodes") |
| 544 | |
| 545 | |
| 546 | class Wikipedia(Dataset): |