Line too long (102 > 79 characters):
22 This dataset is directly adopted from Open Graph Benchmark, and originally curated by MoleculeNet.Line too long (93 > 79 characters):
35 Each molecule is annotated with the scaffold ID that the molecule is assigned to.Line too long (82 > 79 characters):
42 title={Open Graph Benchmark: Datasets for Machine Learning on Graphs},Line too long (112 > 79 characters):
43 author={W. {Hu}, M. {Fey}, M. {Zitnik}, Y. {Dong}, H. {Ren}, B. {Liu}, M. {Catasta}, J. {Leskovec}},Line too long (129 > 79 characters):
50 author={Z. {Wu}, B. {Ramsundar}, E. V {Feinberg}, J. {Gomes}, C. {Geniesse}, A. S {Pappu}, K. {Leswing}, V. {Pande}},Line too long (114 > 79 characters):
70 def __init__(self, version=None, root_dir='data', download=False, split_scheme='official', random_split=False,Line too long (115 > 79 characters):
74 raise ValueError('Versioning for OGB-PPA is handled through the OGB package. Please set version=none.')Line too long (103 > 79 characters):
76 self.ogb_dataset = PygGraphPropPredDataset(name='ogbg-ppa', root=root_dir, transform=add_zeros)Line too long (138 > 79 characters):
83 self._y_type = 'float' # although the task is binary classification, the prediction target contains nan value, thus we need floatLine too long (113 > 79 characters):
95 val_split_idx = random_index[len(split_idx['train']):len(split_idx['train'])+len(split_idx['valid'])]Line too long (91 > 79 characters):
96 test_split_idx = random_index[len(split_idx['train'])+len(split_idx['valid']):]Line too long (104 > 79 characters):
110 metadata_file_path = os.path.join(self.ogb_dataset.root, 'mapping', 'graphidx2speciesid.csv.gz')Line too long (95 > 79 characters):
113 self._metadata_array_wo_y = torch.from_numpy(df_np - df_np.min()).reshape(-1, 1).long()Line too long (97 > 79 characters):
114 self._metadata_array = torch.cat((self._metadata_array_wo_y, self.ogb_dataset.data.y), 1)Line too long (108 > 79 characters):
133 subgraph = GSN(dataset_name='ogbg-ppa', dataset_group='ogb', induced=True, id_type=self.id_type,Line too long (116 > 79 characters):
135 self.graphs_ptg, self.encoder_ids, self.d_id, self.d_degree = subgraph.preprocess(self.ogb_dataset.root)Line too long (86 > 79 characters):
146 self.num_edge_features = self.graphs_ptg[0].edge_features.shape[1]Line too long (91 > 79 characters):
168 - prediction_fn (function): A function that turns y_pred into predicted labels.Line too long (106 > 79 characters):
169 Only None is supported because OGB Evaluators accept binary logitsLine too long (120 > 79 characters):
174 assert prediction_fn is None, "OGBHIVDataset.eval() does not support prediction_fn. Only binary logits accepted"Line too long (89 > 79 characters):
187 deg_inv = torch.where(deg > 0, 1. / torch.sqrt(deg), torch.zeros(deg.size()))Line too long (109 > 79 characters):
197 adj = _sym_normalize_adj(to_dense_adj(graph.edge_index, max_num_nodes=graph.x.size(0)).squeeze())Line too long (85 > 79 characters):
206 target, source = graph.edge_index[0][edge], graph.edge_index[1][edge]