mlx_graphs.datasets.DBLP#
- class mlx_graphs.datasets.DBLP(base_dir: str | None = None, transform: Callable | None = None, pre_transform: Callable | None = None)[source]#
A subset of the DBLP computer science bibliography website, as collected in the “MAGNN: Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding” paper. DBLP is a heterogeneous graph containing four types of entities - authors (4,057 nodes), papers (14,328 nodes), terms (7,723 nodes), and conferences (20 nodes). The authors are divided into four research areas (database, data mining, artificial intelligence, information retrieval). Each author is described by a bag-of-words representation of their paper keywords.
- Parameters:
base_dir (
Optional[str]) – directory where the dataset should be saved.transform (
Optional[Callable]) – A function/transform that takes in anHeteroGraphDataobject and returns a transformed version. The data object will be transformed before every access. (default:None)pre_transform (
Optional[Callable]) – A function/transform that takes in an HeteroGraphData object and returns a transformed version. The data object will be transformed before being saved to disk. (default:None)
- __init__(base_dir: str | None = None, transform: Callable | None = None, pre_transform: Callable | None = None)[source]#
Methods
__init__([base_dir, transform, pre_transform])download()Download the dataset at self.raw_path.
load()Load the processed dataset
process()Process the dataset and store data in self.data
save()Save the processed dataset
Attributes
nameName of the dataset
num_edge_classesReturns a dictionary of the number of edge classes for each edge type.
num_edge_featuresReturns a dictionary of the number of edge features for each edge type.
num_edgesReturns a dictionary of the number of edges for each edge type.
num_graph_featuresReturns the number of graph features.
num_itemsReturns the number of items in the dataset.
num_node_classesReturns a dictionary of the number of node classes for each node type.
num_node_featuresReturns a dictionary of the number of node features for each node type.
num_nodesReturns a dictionary of the number of nodes for each node type.
processed_pathThe path where processed files are stored.
raw_file_namesThe path where raw files are stored.