Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dataset] Add CoraFull, Amazon, KarateClub, Coauthor Dataset #855

Merged
merged 28 commits into from
Sep 30, 2019

Conversation

VoVAllen
Copy link
Collaborator

Description

Add CoraFull, Amazon, KarateClub, Coauthor Dataset

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change
  • Related issue is referred in this PR

Changes

@VoVAllen
Copy link
Collaborator Author

Datset Name Usage # of graphs Avg. # of nodes Avg. # of edges Node field Edge field Graph field Temporal
BitcoinOTC BitcoinOTC() 136 6005.00 21210.0 h True
Cora CoraDataset() 1 2708.00 10556.0 train_mask, val_mask, test_mask, label, feat False
Citeseer CitationGraphDataset('citeseer') 1 3327.00 9228.0 train_mask, val_mask, test_mask, label, feat False
PubMed CitationGraphDataset('pubmed') 1 19717.00 88651.0 train_mask, val_mask, test_mask, label, feat False
QM7b QM7b() 7211 15.42 245.0 h label False
Reddit RedditDataset() 1 232965.00 114615892.0 train_mask, val_mask, test_mask, feat, label False
ENZYMES TUDataset('ENZYMES') 600 32.63 124.3 feat label False
DD TUDataset('DD') 1178 284.32 1431.3 feat label False
COLLAB TUDataset('COLLAB') 5000 74.49 9830.0 feat label False
PPI PPIDataset('train')/PPIDataset('valid')/PPIDataset('test') 20 2245.30 63563.7 feat label False
KarateClub KarateClub() 1 34.00 156.0 label False
Amazon computer AmazonCoBuy('computers') 1 13752.00 574418.0 feat, label False
Amazon photo AmazonCoBuy('photo') 1 7650.00 287326.0 feat, label False
Coauthor cs Coauthor('cs') 1 18333.00 327576.0 feat, label False
Coauthor physics Coauthor('physics') 1 34493.00 991848.0 feat, label False
GDELT GDELT('train')/GDELT('valid')/GDELT('test') 2304 23033.00 811333.1 rel_type True
ICEWS18 ICEWS18('train')/ICEWS18('valid')/ICEWS18('test') 240 23033.00 192640.2 rel_type True
CoraFull CoraFull() 1 19793.00 130622.0 feat, label False

@VoVAllen
Copy link
Collaborator Author

Todo

  • QM9
  • KG Dataset
  • g.gdata

@@ -123,7 +123,7 @@ def graph_classify_task(prog_args):
perform graph classification task
'''

dataset = tu.TUDataset(name=prog_args.dataset)
dataset = tu.LegacyTUDataset(name=prog_args.dataset)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the LegacyTUDataset and TUDataset have the same APIs?

Copy link
Collaborator Author

@VoVAllen VoVAllen Sep 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The processing code are quite different. In the new TUDataset, I only used raw data without adding one-hot label or constant as node features.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope QM9 results will be online soon

@@ -136,3 +141,138 @@ def __getitem__(self, item):
return self.valid_graphs[item], self.features[self.valid_mask_list[item]], self.valid_labels[item]
if self.mode == 'test':
return self.test_graphs[item], self.features[self.test_mask_list[item]], self.test_labels[item]


class PPIDataset(object):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's this different than LegacyPPIDataset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost same other than the __getitem__ part. I changed it to inheritance and override __getitem__

@jermainewang jermainewang added this to the v0.4 milestone Sep 30, 2019
@VoVAllen VoVAllen merged commit 9c790b1 into dmlc:master Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants