-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.py
63 lines (46 loc) · 1.54 KB
/
Constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PAD = 0
Ks = [1, 5, 10, 20]
print('k:', Ks)
DATASET = "douban-book" # Yelp2018 Gowalla Foursquare ml-1M douban-book
ABLATIONs = {'w/oWeSch', 'w/oPopDe', 'w/oSA', 'w/oNorm', 'w/oUSpec', 'w/oHgcn', 'w/oDisen'}
ABLATION = 'Full'
user_dict = {
'ml-1M': 6038,
'douban-book': 12859,
'Gowalla': 18737,
'Yelp2018': 31668,
'Foursquare': 7642
}
item_dict = {
'ml-1M': 3533,
'douban-book': 22294,
'Gowalla': 32510,
'Yelp2018': 38048,
'Foursquare': 28483
}
ITEM_NUMBER = item_dict.get(DATASET)
USER_NUMBER = user_dict.get(DATASET)
print('Dataset:', DATASET, '#User:', USER_NUMBER, '#ITEM', ITEM_NUMBER)
print('ABLATION: ', ABLATION)
beta_dict = {
'ml-1M': 0.42, # best 0.42, # 0.5, # 0.8 # 3629
'douban-book': 0.07, # best 0.07, 0.05,
'Gowalla': 0.1,
'Yelp2018': 0.25, # best 0.25,
'Foursquare': 0.5, # best 0.5
}
eta_dict = {
'ml-1M': 0.06, # best 0.42, # 0.5, # 0.8 # 3629
'douban-book': 0.65, # best 0.07, 0.05,
'Gowalla': 0.1,
'Yelp2018': 0.6, # best 0.25,
'Foursquare': 0.04, # best 0.5
}
BETA_1 = beta_dict[DATASET]
if ABLATION == 'w/oPopDe' or ABLATION == 'w/oDisen': BETA_1 = 0
# During ablation study, in below cases, the popularity features will be over weighted, leading to over low accuracies.
if ABLATION == 'w/oSA' and DATASET == 'Yelp2018': BETA_1 = 0.01
if ABLATION == 'w/oSA' and DATASET == 'Yelp': BETA_1 = 0
if ABLATION == 'w/oHgcn' and DATASET == 'Gowalla': BETA_1 = 0
if ABLATION == 'OlyHGCN' and DATASET == 'Yelp2018': BETA_1 = 0.05
print('BETA_1', BETA_1)