grakel.datasets.fetch_dataset#

grakel.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 [KKM+16].

For more info visit: https://chrsmrrs.github.io/datasets/docs/datasets/

Parameters:
namestr

The name of the dataset (as found in https://chrsmrrs.github.io/datasets/docs/datasets/).

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 IOError 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#

[KKM+16]

Kristian Kersting, Nils M. Kriege, Christopher Morris, Petra Mutzel, and Marion Neumann. Benchmark data sets for graph kernels. 2016. URL: http://graphkernels.cs.tu-dortmund.de.

Examples using grakel.datasets.fetch_dataset#

Classification pipeline

Classification pipeline

Shortest path kernel

Shortest path kernel

Node-attributed graphs

Node-attributed graphs

Optimizing hyperparameters

Optimizing hyperparameters

Weisfeiler-Lehman subtree kernel

Weisfeiler-Lehman subtree kernel