Skip to content

TUDataset

TUDataset(name: str, cleaned: bool = False, base_dir: Optional[str] = None)

Bases: Dataset

A collection of over 120 benchmark datasets for graph classification and regression, made available by TU Dortmund University. Access all these datasets here.

This class also supports cleaned dataset versions containing only non-isomorphic graphs, and presented in Understanding Isomorphism Bias in Graph Data Sets.

Parameters:

Name Type Description Default
name str

Name of the dataset to load (e.g. "MUTAG", "PROTEINS", "IMDB-BINARY", etc.).

required
cleaned bool

Whether to use the cleaned or original version of datasets. Default is False.

False
base_dir Optional[str]

Directory where to store dataset files. Default is in the local directory .mlx_graphs_data/.

None
Source code in mlx_graphs/datasets/tu_dataset.py
def __init__(
    self,
    name: str,
    cleaned: bool = False,
    base_dir: Optional[str] = None,
):
    self.cleaned = cleaned

    super().__init__(name=name, base_dir=base_dir)

from mlx_graphs.datasets import TUDataset · mlx_graphs/datasets/tu_dataset.py