AmazonBook

class dhg.data.AmazonBook(data_root=None)[source]

Bases: dhg.data.base.BaseData

The AmazonBook dataset is collected for user-item recommendation task. This dataset is a subset of Amazon-review. Wherein, books are viewed as the items.

The content of the Amazon-Book dataset includes the following:

  • num_users: The number of users: \(52,643\).

  • num_items: The number of items: \(91,599\).

  • num_interactions: The number of interactions: \(2,984,108\).

  • train_adj_list: The train adjacency list.

  • test_adj_list: The test adjacency list.

Note

The first item of each line in the adj_list is the user id, and the rest is the item id.

Parameters

data_root (str, optional) – The data_root has stored the data. If set to None, this function will auto-download from server and save into the default direction ~/.dhg/datasets/. Defaults to None.