grakelx.datasets.fetch_dataset

grakelx.datasets.fetch_dataset(name, verbose=True, data_home=None, download_if_missing=True, with_classes=True, produce_labels_nodes=False, prefer_attr_nodes=False, prefer_attr_edges=False, as_graphs=False)[source][source]

Access a large collection of benchmark datasets from TU Dortmund [].

For more info visit: https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets

Parameters:
namestr

The name of the dataset (as found in https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets).

verbosebool, default=True

Print messages, throughout execution.

data_homestring, default=None

Specify another download and cache folder for the datasets. By default all grakel data is stored in ‘~/grakel_data’ subfolders.

download_if_missingboolean, default=True

If False, raise a OSError if the data is not locally available instead of trying to download the data from the source site.

with_classesbool, default=False

Return an iterable of class labels based on the enumeration.

produce_labels_nodesbool, default=False

Produce labels for nodes if not found. Currently this means labeling its node by its degree inside the Graph. This operation is applied only if node labels are non existent.

prefer_attr_nodesbool, default=False

If a dataset has both node labels and node attributes set as labels for the graph object for nodes the attributes.

prefer_attr_edgesbool, default=False

If a dataset has both edge labels and edge attributes set as labels for the graph object for edge the attributes.

as_graphsbool, default=False

Return data as a list of Graph Objects.

Returns:
graphsiterable

Returns an iterable of the produced valid-graph-format and labels for each node.

classeslist

Returns a list of all the classes corresponding to each graph by order of input.

Bibliography

Examples using grakelx.datasets.fetch_dataset

Example of building a graph classification pipeline.

Example of building a graph classification pipeline.

Graph classification on MUTAG using the shortest path kernel.

Graph classification on MUTAG using the shortest path kernel.

Graph classification on a dataset that contains node-attributed graphs.

Graph classification on a dataset that contains node-attributed graphs.

Graph classification on MUTAG using the Weisfeiler-Lehman subtree kernel.

Graph classification on MUTAG using the Weisfeiler-Lehman subtree kernel.

Performing cross-validation n times, optimizing SVM’s and kernel’s hyperparameters.

Performing cross-validation n times, optimizing SVM's and kernel's hyperparameters.