Cleaned up experimental run files.
This commit is contained in:
parent
c29361aa7d
commit
93d2aaf259
@ -31,11 +31,11 @@ def run_regression(train_embeds, train_labels, test_embeds, test_labels):
|
||||
if __name__ == '__main__':
|
||||
parser = ArgumentParser("Run evaluation on citation data.")
|
||||
parser.add_argument("dataset_dir", help="Path to directory containing the dataset.")
|
||||
parser.add_argument("data_dir", help="Path to directory containing the learned node embeddings.")
|
||||
parser.add_argument("embed_dir", help="Path to directory containing the learned node embeddings.")
|
||||
parser.add_argument("setting", help="Either val or test.")
|
||||
args = parser.parse_args()
|
||||
dataset_dir = args.dataset_dir
|
||||
data_dir = args.data_dir
|
||||
data_dir = args.embed_dir
|
||||
setting = args.setting
|
||||
|
||||
print("Loading data...")
|
||||
|
@ -21,11 +21,11 @@ def run_regression(train_embeds, train_labels, test_embeds, test_labels):
|
||||
if __name__ == '__main__':
|
||||
parser = ArgumentParser("Run evaluation on PPI data.")
|
||||
parser.add_argument("dataset_dir", help="Path to directory containing the dataset.")
|
||||
parser.add_argument("data_dir", help="Path to directory containing the learned node embeddings. Set to 'feat' for raw features.")
|
||||
parser.add_argument("embed_dir", help="Path to directory containing the learned node embeddings. Set to 'feat' for raw features.")
|
||||
parser.add_argument("setting", help="Either val or test.")
|
||||
args = parser.parse_args()
|
||||
dataset_dir = args.dataset_dir
|
||||
data_dir = args.data_dir
|
||||
data_dir = args.embed_dir
|
||||
setting = args.setting
|
||||
|
||||
print("Loading data...")
|
||||
|
@ -24,11 +24,11 @@ def run_regression(train_embeds, train_labels, test_embeds, test_labels):
|
||||
if __name__ == '__main__':
|
||||
parser = ArgumentParser("Run evaluation on Reddit data.")
|
||||
parser.add_argument("dataset_dir", help="Path to directory containing the dataset.")
|
||||
parser.add_argument("data_dir", help="Path to directory containing the learned node embeddings. Set to 'feat' for raw features.")
|
||||
parser.add_argument("embed_dir", help="Path to directory containing the learned node embeddings. Set to 'feat' for raw features.")
|
||||
parser.add_argument("setting", help="Either val or test.")
|
||||
args = parser.parse_args()
|
||||
dataset_dir = args.dataset_dir
|
||||
data_dir = args.data_dir
|
||||
data_dir = args.embed_dir
|
||||
setting = args.setting
|
||||
|
||||
print("Loading data...")
|
||||
|
@ -59,13 +59,18 @@ class EdgeMinibatchIterator(object):
|
||||
|
||||
def _remove_isolated(self, edge_list):
|
||||
new_edge_list = []
|
||||
missing = 0
|
||||
for n1, n2 in edge_list:
|
||||
if not n1 in self.G.node or not n2 in self.G.node:
|
||||
missing += 1
|
||||
continue
|
||||
if (self.deg[self.id2idx[n1]] == 0 or self.deg[self.id2idx[n2]] == 0) \
|
||||
and (not self.G.node[n1]['test'] or self.G.node[n1]['val']) \
|
||||
and (not self.G.node[n2]['test'] or self.G.node[n2]['val']):
|
||||
continue
|
||||
else:
|
||||
new_edge_list.append((n1,n2))
|
||||
print("Unexpected missing:", missing)
|
||||
return new_edge_list
|
||||
|
||||
def construct_adj(self):
|
||||
|
Loading…
Reference in New Issue
Block a user