cogdl.datasets.gcc_data

Module Contents

Classes

Edgelist

Dataset base class for creating graph datasets.

USAAirportDataset

Dataset base class for creating graph datasets.

class cogdl.datasets.gcc_data.Edgelist(root, name)[source]

Bases: cogdl.data.Dataset

Dataset base class for creating graph datasets. See here for the accompanying tutorial.

Args:

root (string): Root directory where the dataset should be saved. transform (callable, optional): A function/transform that takes in an

cogdl.data.Data 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 cogdl.data.Data object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)

pre_filter (callable, optional): A function that takes in an

cogdl.data.Data object and returns a boolean value, indicating whether the data object should be included in the final dataset. (default: None)

url = https://github.com/cenyk1230/gcc-data/raw/master[source]
property raw_file_names(self)[source]

The name of the files to find in the self.raw_dir folder in order to skip the download.

property processed_file_names(self)[source]

The name of the files to find in the self.processed_dir folder in order to skip the processing.

download(self)[source]

Downloads the dataset to the self.raw_dir folder.

get(self, idx)[source]

Gets the data object at index idx.

process(self)[source]

Processes the dataset to the self.processed_dir folder.

class cogdl.datasets.gcc_data.USAAirportDataset[source]

Bases: cogdl.datasets.gcc_data.Edgelist

Dataset base class for creating graph datasets. See here for the accompanying tutorial.

Args:

root (string): Root directory where the dataset should be saved. transform (callable, optional): A function/transform that takes in an

cogdl.data.Data 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 cogdl.data.Data object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)

pre_filter (callable, optional): A function that takes in an

cogdl.data.Data object and returns a boolean value, indicating whether the data object should be included in the final dataset. (default: None)