Skip to content

Commit a2263ab

Browse files
committed
debiasing with different backbones (v1)
1 parent c3f20d5 commit a2263ab

46 files changed

Lines changed: 1652 additions & 112 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

recstudio/data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from recstudio.data.dataset import TripletDataset, SeqDataset, UserDataset, FullSeqDataset
1+
from recstudio.data.dataset import TripletDataset, SeqDataset, UserDataset, FullSeqDataset, DICEDataset, UBPRDataset
22
from recstudio.data.advance_dataset import ALSDataset
33

44
import os

recstudio/data/config/all.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,9 @@ mapped_feat_field: [*u, *i]
4949
network_feat_field: [[[source_id:token, target_id:token]], [[head_id:token, tail_id:token, relation_id:token], [*i, entity_id:token]]]
5050
network_feat_header: [0, 0]
5151

52+
# interactions that are missing completely at random
53+
mcar_feat_name: ~
54+
inter_feat_field: [*u, *i, *r, *t]
55+
inter_feat_header: ~
56+
5257
save_cache: False # whether to save processed dataset to cache.

recstudio/data/config/amazon-beauty.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ field_separator: ","
2222
min_user_inter: 5
2323
min_item_inter: 5
2424
field_max_len: ~
25-
low_rating_threshold: 3.0
25+
low_rating_thres: 3.0
2626
max_seq_len: 50
2727

2828
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

recstudio/data/config/amazon-books.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ field_separator: ","
2323
min_user_inter: 5
2424
min_item_inter: 5
2525
field_max_len: ~
26-
low_rating_threshold: ~
26+
low_rating_thres: ~
2727
max_seq_len: 20
2828

2929
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

recstudio/data/config/amazon-electronics.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ field_separator: ","
2323
min_user_inter: 5
2424
min_item_inter: 5
2525
field_max_len: ~
26-
low_rating_threshold: 3
26+
low_rating_thres: 3
2727
max_seq_len: 20
2828

2929
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

recstudio/data/config/coat.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
url: https://rec.ustc.edu.cn/share/b097d230-c7e1-11ed-997a-bba57c4b600a
2+
user_id_field: &u user_id:token # TODO: comments for &u and *u
3+
item_id_field: &i item_id:token
4+
rating_field: &r rating:float
5+
time_field: ~
6+
time_format: ~
7+
8+
9+
inter_feat_name: coat.mnar
10+
inter_feat_field: [*u, *i, *r]
11+
inter_feat_header: 0
12+
13+
user_feat_name: [coat.user]
14+
user_feat_field: [[*u, ugender(men):token, ugender(women):token, age(20-30):token, age(30-40):token, age(40-50):token, age(50-60):token, age(over 60):token, age(under 20):token, location(rural):token, location(suburban):token, location(urban):token, fashioninterest(moderately):token, fashioninterest(not at all):token, fashioninterest(very):token]]
15+
user_feat_header: 0
16+
17+
18+
item_feat_name: [coat.item]
19+
item_feat_field: [[*i, igender(men):token, igender(women):token, jackettype(bomber):token, jackettype(cropped):token, jackettype(field):token, jackettype(fleece):token, jackettype(insulated):token, jackettype(motorcycle):token, jackettype(other):token, jackettype(packable):token, jackettype(parkas):token, jackettype(pea):token, jackettype(rain):token, jackettype(shells):token, jackettype(track):token, jackettype(trench):token, jackettype(vests):token, jackettype(waterproof):token, color(beige):token, color(black):token, color(blue):token, color(brown):token, color(gray):token, color(green):token, color(multi):token, color(navy):token, color(olive):token, color(other):token, color(pink):token, color(purple):token, color(red):token, onfrontpage(yes):token, onfrontpage(no):token]]
20+
item_feat_header: 0
21+
22+
23+
field_separator: "\t"
24+
min_user_inter: 5
25+
min_item_inter: 5
26+
field_max_len: ~
27+
low_rating_thres: 3.0
28+
max_seq_len: 20
29+
30+
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features
31+
network_feat_name: ~
32+
mapped_feat_field: ~
33+
network_feat_field: ~
34+
network_feat_header: ~
35+
36+
# interactions that are missing completely at random
37+
mcar_feat_name: coat.mcar
38+
mcar_feat_field: [*u, *i, *r]
39+
mcar_feat_header: 0
40+
41+
# propensities of each (u, i) pair
42+
# propensity_feat_name: coat.propensities
43+
# propensity_feat_field: [*u, *i, propensity:float]
44+
# propensity_feat_header: 0
45+
46+
47+
save_cache: True # whether to save processed dataset to cache.

recstudio/data/config/gowalla.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ seq_separator: " "
2424
min_user_inter: 5
2525
min_item_inter: 5
2626
field_max_len: ~
27-
low_rating_threshold: ~
27+
low_rating_thres: ~
2828
max_seq_len: 20
2929

3030
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

recstudio/data/config/ml-100k.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ item_feat_header: 0
2121

2222

2323
field_separator: "\t"
24-
min_user_inter: 0
25-
min_item_inter: 0
24+
min_user_inter: 5
25+
min_item_inter: 5
2626
field_max_len: ~
2727
low_rating_thres: 3.0
2828
max_seq_len: 20

recstudio/data/config/ml-10m.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ field_separator: "::"
2626
min_user_inter: 5
2727
min_item_inter: 5
2828
field_max_len: ~
29-
low_rating_threshold: 3.0
29+
low_rating_thres: 3.0
3030
max_seq_len: 20
3131

3232
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

recstudio/data/config/ml-20m.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ field_separator: ","
2626
min_user_inter: 5
2727
min_item_inter: 5
2828
field_max_len: ~
29-
low_rating_threshold: ~
29+
low_rating_thres: ~
3030
max_seq_len: 20
3131

3232
# network feature, including social network and knowledge graph, the first two fields are remapped the corresponding features

0 commit comments

Comments
 (0)