torch_geometric.datasets.WebKB
- class WebKB(root: str, name: str, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset
The WebKB datasets used in the “Geom-GCN: Geometric Graph Convolutional Networks” paper. Nodes represent web pages and edges represent hyperlinks between them. Node features are the bag-of-words representation of web pages. The task is to classify the nodes into one of the five categories, student, project, course, staff, and faculty.
- Parameters:
root (str) – Root directory where the dataset should be saved.
name (str) – The name of the dataset (
"Cornell"
,"Texas"
,"Wisconsin"
).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
)
STATS:
Name
#nodes
#edges
#features
#classes
Cornell
183
298
1,703
5
Texas
183
325
1,703
5
Wisconsin
251
515
1,703
5