gammagl.datasets.Entities

class Entities(root: str | None = None, name: str = 'aifb', hetero: bool = False, transform: Callable | None = None, pre_transform: Callable | None = None, force_reload: bool = False)[source]

The relational entities networks “AIFB”, “MUTAG”, “BGS” and “AM” from the “Modeling Relational Data with Graph Convolutional Networks” paper. Training and test splits are given by node indices.

Parameters:
  • root (str, optional) – Root directory where the dataset should be saved.

  • name (str, optional) – The name of the dataset ("AIFB", "MUTAG", "BGS", "AM").

  • hetero (bool, optional) – If set to True, will save the dataset as a HeteroGraph object. (default: False)

  • transform (callable, optional) – A function/transform that takes in an gammagl.data.Graph object and returns a transformed version. The data object will be transformed before every access. (default: None)

  • pre_transform (callable, optional) – A function/transform that takes in an gammagl.data.Graph object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)

  • (bool (force_reload) – (default: False)

  • optional) (Whether to re-process the dataset.) – (default: False)

url = 'https://data.dgl.ai/dataset/{}.tgz'
property raw_dir: str
property processed_dir: str
property num_relations: int
property num_classes: int

Returns the number of classes in the dataset.

property raw_file_names: List[str]

The name of the files in the self.raw_dir folder that must be present in order to skip downloading.

property processed_file_names: str

The name of the files in the self.processed_dir folder that must be present in order to skip processing.

download()[source]

Downloads the dataset to the self.raw_dir folder.

process()[source]

Processes the dataset to the self.processed_dir folder.