torch_geometric.datasets.AmazonBook
- class AmazonBook(root: str, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset
A subset of the AmazonBook rating dataset from the “LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation” paper. This is a heterogeneous dataset consisting of 52,643 users and 91,599 books with approximately 2.9 million ratings between them. No labels or features are provided.
- Parameters:
root (
str
) – Root directory where the dataset should be saved.transform (
Optional
[Callable
], default:None
) – A function/transform that takes in antorch_geometric.data.HeteroData
object and returns a transformed version. The data object will be transformed before every access.pre_transform (
Optional
[Callable
], default:None
) – A function/transform that takes in antorch_geometric.data.HeteroData
object and returns a transformed version. The data object will be transformed before being saved to disk.force_reload (
bool
, default:False
) – Whether to re-process the dataset.