def load_graphs_NCI_AIDS(): """Load the NCI antiHIV graph dataset for graph classification.. Returns ------- data : Bunch Dictionary-like object with the following attributes : 'graphs', the graphs in the dataset in Networkx format, 'target', the classification labels for each sample. """ input_target_url = 'http://www.math.unipd.it/~nnavarin/datasets/NCI_AIDS/AIDO99SD_numeric.labels' input_data_url = 'http://www.math.unipd.it/~nnavarin/datasets/NCI_AIDS/AIDO99SD.gspan' _target = load_target(input_target_url) g_it = instance_to_graph(input=input_data_url) print 'Loaded NCI antiHIV dataset graph dataset for graph classification.' return Bunch(graphs=[i for i in g_it], target=_target, labels=True, veclabels=False)
def load_graphs_AIDS(): """Load the AIDS graph dataset for graph classification.. Returns ------- data : Bunch Dictionary-like object with the following attributes : 'graphs', the graphs in the dataset in Networkx format, 'target', the classification labels for each sample. """ input_target_url = 'http://www.math.unipd.it/~nnavarin/datasets/AIDS/CAvsCM.y' input_data_url = 'http://www.math.unipd.it/~nnavarin/datasets/AIDS/CAvsCM.can' _target = load_target(input_target_url) from obabel import obabel_to_eden g_it = obabel_to_eden(input=input_data_url, file_type='smi') gra = [i for i in g_it] print 'Loaded AIDS graph dataset for graph classification.' print len(gra), 'graphs.' return Bunch(graphs=gra, target=_target, labels=True, veclabels=False)
def load_graphs_bursi(): """Load the Bursi graph dataset for graph classification.. Returns ------- data : Bunch Dictionary-like object with the following attributes : 'graphs', the graphs in the dataset in Networkx format, 'target', the classification labels for each sample. """ input_target_url = 'http://www.bioinf.uni-freiburg.de/~costa/bursi.target' input_data_url = 'http://www.bioinf.uni-freiburg.de/~costa/bursi.gspan' _target = load_target(input_target_url) g_it = instance_to_graph(input=input_data_url) print 'Loaded Bursi graph dataset for graph classification.' return Bunch(graphs=[i for i in g_it], target=_target, labels=True, veclabels=False)
def load_graphs_LMdata(): """Load the LMdata graph dataset for graph classification.. Returns ------- data : Bunch Dictionary-like object with the following attributes : 'graphs', the graphs in the dataset in Networkx format, 'target', the classification labels for each sample. """ input_target_url = 'http://www.math.unipd.it/~nnavarin/datasets/LMdata/labels.txt.standardized' input_data_url = 'http://www.math.unipd.it/~nnavarin/datasets//LMdata/graphs.gspan.standardized' _target = load_target(input_target_url) label_dict = {} counter = [1] g_it = instance_to_graph(input_data_url, label_dict, counter) print 'Loaded LMdata graph dataset for graph classification.' return Bunch(graphs=[i for i in g_it], label_dict=label_dict, target=_target, labels=True, veclabels=False)
def load_graphs_NCI1(): """Load the NCI1 graph dataset for graph classification.. Returns ------- data : Bunch Dictionary-like object with the following attributes : 'graphs', the graphs in the dataset in Networkx format, 'target', the classification labels for each sample. """ input_target_url = 'http://www.math.unipd.it/~nnavarin/datasets/NCI1/NCI1_labels.txt' input_data_url = 'http://www.math.unipd.it/~nnavarin/datasets/NCI1/NCI1_graphs.gspan' _target = load_target(input_target_url) label_dict = {} g_it = instance_to_graph(input=input_data_url) #g_it=instance_to_graph(input = input_data_url,label_dict=label_dict) print 'Loaded NCI1 graph dataset for graph classification.' return Bunch( graphs=[i for i in g_it], target=_target, #label_dict=label_dict, labels=True, veclabels=False)