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 (callable, optional) – A function/transform that takes in an
torch_geometric.data.HeteroData
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.HeteroData
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
)