torch_geometric.datasets.WikipediaNetwork
- class WikipediaNetwork(root: str, name: str, geom_gcn_preprocess: bool = True, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset
The Wikipedia networks introduced in the “Multi-scale Attributed Node Embedding” paper. Nodes represent web pages and edges represent hyperlinks between them. Node features represent several informative nouns in the Wikipedia pages. The task is to predict the average daily traffic of the web page.
- Parameters:
root (str) – Root directory where the dataset should be saved.
name (str) – The name of the dataset (
"chameleon"
,"crocodile"
,"squirrel"
).geom_gcn_preprocess (bool) – If set to
True
, will load the pre-processed data as introduced in the “Geom-GCN: Geometric Graph Convolutional Networks” <https://arxiv.org/abs/2002.05287>_, in which the average monthly traffic of the web page is converted into five categories to predict. If set toTrue
, the dataset"crocodile"
is not available. If set toTrue
, train/validation/test splits will be available as masks for multiple splits with shape[num_nodes, num_splits]
. (default:True
)transform (callable, optional) – A function/transform that takes in an
torch_geometric.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
torch_geometric.data.Data
object and returns a transformed version. The data object will be transformed before being saved to disk. (default:None
)force_reload (bool, optional) – Whether to re-process the dataset. (default:
False
)