-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
168 lines (163 loc) · 6.3 KB
/
config.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import os
os.environ["KERAS_BACKEND"] = "torch"
from utils import *
config = {
"ml20m": (
Dataset("MovieLens20M"),
{
"filename": "_datasets/ml20m/ratings.csv",
"item_id_name": "movieId",
"user_id_name": "userId",
"value_name": "rating",
"timestamp_name": "timestamp",
"min_value_to_keep": 4.0,
"user_min_support": 5,
"set_all_values_to": 1.0,
"num_test_users": 10000,
"random_state": 42,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/ml20m/item_text_descriptions.feather")""",
"items_item_id_name": "movieId",
"items_preprocess": """f'{row.llama31_description}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
},
),
"goodbooks": (
Dataset("Goodbooks-10k"),
{
"raw_data": """pd.read_csv("_datasets/goodbooks/ratings.csv")""",
"user_id_name": "user_id",
"item_id_name": "book_id",
"value_name": "rating",
"min_value_to_keep": 4.0,
"user_min_support": 5,
"item_min_support": 1,
"set_all_values_to": 1.0,
"num_test_users": 2500,
"random_state": 42,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/goodbooks/item_text_descriptions.feather")""",
"items_item_id_name": "book_id",
"items_preprocess": """f'{row.llama31_description}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
},
),
"amazon-books": (
Dataset("Amazon books"),
{
"raw_data": """pd.read_feather("_datasets/amazbooks/ratings.feather")""",
"value_name": "rating",
"item_id_name": "asin",
"user_id_name": "uid",
"timestamp_name": "timestamp",
"min_value_to_keep": 4.0,
"user_min_support": 5,
"item_min_support": 1,
"set_all_values_to": 1.0,
"num_test_users": 10000,
"random_state": 42,
"max_steps": 1000,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/amazbooks/item_text_descriptions.feather")""",
"items_item_id_name": "asin",
"items_preprocess": """f'{row.llama31_description}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
},
),
"amazon-electronics": (
Dataset("Amazon electronics"),
{
"raw_data": """pd.read_feather("_datasets/amazon_electronics/electronics_interactions_small.feather")""",
"value_name": "value",
"item_id_name": "item_id",
"user_id_name": "user_id",
"timestamp_name": "timestamp",
"min_value_to_keep": 1.0,
"user_min_support": 1,
"item_min_support": 1,
"set_all_values_to": 1.0,
"num_test_users": 10000,
"random_state": 42,
"max_steps": 1000,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/amazon_electronics/electronics_items_small.feather")""",
"items_item_id_name": "asin",
"items_preprocess": """f'{row.title}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
"images_dir": "_datasets/amazon_electronics/images"
},
),
"amazon-fashion": (
Dataset("Amazon clothing, shoes and jewelry"),
{
"raw_data": """pd.read_feather("_datasets/amazon_fashion/fashion_interactions_small.feather")""",
"value_name": "value",
"item_id_name": "item_id",
"user_id_name": "user_id",
"timestamp_name": "timestamp",
"min_value_to_keep": 1.0,
"user_min_support": 1,
"item_min_support": 1,
"set_all_values_to": 1.0,
"num_test_users": 10000,
"random_state": 42,
"max_steps": 1000,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/amazon_fashion/fashion_items_small_text.feather")""",
"items_item_id_name": "asin",
"items_preprocess": """f'{row.text}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
"images_dir": "_datasets/amazon_fashion/images"
},
),
"goodbooks-img": (
Dataset("Goodbooks-10k"),
{
"raw_data": """pd.read_csv("_datasets/goodbooks/ratings.csv")""",
"user_id_name": "user_id",
"item_id_name": "book_id",
"value_name": "rating",
"min_value_to_keep": 4.0,
"user_min_support": 5,
"item_min_support": 1,
"set_all_values_to": 1.0,
"num_test_users": 2500,
"random_state": 42,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/goodbooks/item_text_descriptions_img.feather")""",
"items_item_id_name": "book_id",
"items_preprocess": """f'{row.llama31_description}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
"images_dir": "_datasets/goodbooks/images",
},
),
"ml20m-img": (
Dataset("MovieLens20M"),
{
"filename": "_datasets/ml20m/ratings.csv",
"item_id_name": "movieId",
"user_id_name": "userId",
"value_name": "rating",
"timestamp_name": "timestamp",
"min_value_to_keep": 4.0,
"user_min_support": 5,
"set_all_values_to": 1.0,
"num_test_users": 10000,
"random_state": 42,
"load_previous_splits": False,
"items_raw_data": """pd.read_feather("_datasets/ml20m/item_text_descriptions_img.feather")""",
"items_item_id_name": "movieId",
"items_preprocess": """f'{row.llama31_description}'""",
"coldstart_fraction": 0.1,
"num_coldstart_items": 2000,
"images_dir": "_datasets/ml20m/images",
"images_suffix": ".0",
},
),
}