torch_geometric.datasets.WebKB
- class WebKB(root: str, name: str, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None)[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
)