gammagl.datasets.CA_GrQc

class CA_GrQc(dir: str, n_emb: int)[source]

The CA-GrQc datasets used in the “GraphGAN: Graph Representation Learning with Generative Adversarial Nets” paper. arXiv-GrQc is from arXiv and covers scientific collaborations between authors with papers submitted to the General Relativity and Quantum Cosmology categories. This graph has 5,242 vertices and 14,496 edges.

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

  • n_emb (int) – Dimension of node embeddings

url = 'https://raw.githubusercontent.com/hwwang55/GraphGAN/master'
property file_names: List[str]
download(dir)[source]
read_edges(train_filename, test_filename)[source]

read data from downloaded files

Parameters:
  • train_filename – training file name

  • test_filename – test file name

Returns:

(:obj:`int`, :obj:`dict`)

Return type:

number of nodes in the graph and node_id -> list of neighbors in the graph

str_list_to_int(str_list)[source]
read_edges_from_file(filename)[source]