Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dexterRuc committed Aug 10, 2020
0 parents commit e6c774d
Show file tree
Hide file tree
Showing 21 changed files with 110,860 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# NOTE
In the PAPER, we pair the ground-truth item
with 99 randomly sampled negative items that the user
has not interacted with, and report the results of
HR@{1, 5, 10}, NDCG@{5, 10} and MRR.

In the repo, we rank the ground-truth item with ALL the items.
We omit the FM and AutoInt because they need
enumerate all user-item pairs, which take a very long time.
The results are shown in the following pic(all_rank.PNG).

Performance comparison of different methods on six datasets. The best performance and the second best performance
methods are denoted in bold and underlined fonts respectively.

![avatar](all_rank.PNG)

### requirements
```shell script
pip install -r requirements.txt
```

### data preprocess
```shell script
./data/data_process.py

data-name.txt
one user per line
user_1 item_1 item_2 ...
user_2 item_1 item_2 ...

data-name_item2attributes.json
{item_1:[attr, ...], item_2:[attr, ...], ... }
```

### pretrain
```shell script
python run_pretrain.py \
--data_name Beauty
```

### finetune
```shell script
python run_finetune.py \
--data_name Beauty \
--ckp 100
```
Binary file added all_rank.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22,363 changes: 22,363 additions & 0 deletions data/Beauty.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Beauty_item2attributes.json

Large diffs are not rendered by default.

1,090 changes: 1,090 additions & 0 deletions data/LastFM.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/LastFM_item2attributes.json

Large diffs are not rendered by default.

35,598 changes: 35,598 additions & 0 deletions data/Sports_and_Outdoors.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Sports_and_Outdoors_item2attributes.json

Large diffs are not rendered by default.

19,412 changes: 19,412 additions & 0 deletions data/Toys_and_Games.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Toys_and_Games_item2attributes.json

Large diffs are not rendered by default.

30,431 changes: 30,431 additions & 0 deletions data/Yelp.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/Yelp_item2attributes.json

Large diffs are not rendered by default.

Loading

0 comments on commit e6c774d

Please sign in to comment.