datasets.han_data

Module Contents

Classes

HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the

ACM_HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the

DBLP_HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the

IMDB_HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the

Functions

untar(path, fname, deleteTar=True)

Unpacks the given archive file to the same directory, then (by default)

sample_mask(idx, l)

Create mask.

datasets.han_data.untar(path, fname, deleteTar=True)[source]

Unpacks the given archive file to the same directory, then (by default) deletes the archive file.

datasets.han_data.sample_mask(idx, l)[source]

Create mask.

class datasets.han_data.HANDataset(root, name)[source]

Bases: cogdl.data.Dataset

The network datasets “ACM”, “DBLP” and “IMDB” from the “Heterogeneous Graph Attention Network” paper.

Args:

root (string): Root directory where the dataset should be saved. name (string): The name of the dataset ("han-acm",

"han-dblp", "han-imdb").

property raw_file_names(self)[source]
property processed_file_names(self)[source]
read_gtn_data(self, folder)[source]
get(self, idx)[source]
apply_to_device(self, device)[source]
download(self)[source]
process(self)[source]
__repr__(self)[source]
class datasets.han_data.ACM_HANDataset[source]

Bases: datasets.han_data.HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the “Heterogeneous Graph Attention Network” paper.

Args:

root (string): Root directory where the dataset should be saved. name (string): The name of the dataset ("han-acm",

"han-dblp", "han-imdb").

class datasets.han_data.DBLP_HANDataset[source]

Bases: datasets.han_data.HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the “Heterogeneous Graph Attention Network” paper.

Args:

root (string): Root directory where the dataset should be saved. name (string): The name of the dataset ("han-acm",

"han-dblp", "han-imdb").

class datasets.han_data.IMDB_HANDataset[source]

Bases: datasets.han_data.HANDataset

The network datasets “ACM”, “DBLP” and “IMDB” from the “Heterogeneous Graph Attention Network” paper.

Args:

root (string): Root directory where the dataset should be saved. name (string): The name of the dataset ("han-acm",

"han-dblp", "han-imdb").