Update benchmarks/models/itemknn/README.md (#9)
Browse files- Update benchmarks/models/itemknn/README.md (b135b95e26949729529cab0f73d419bef7af9376)
Co-authored-by: Vladimir <[email protected]>
benchmarks/models/itemknn/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
# ItemKNN
|
2 |
|
3 |
-
We employ cosine similarity to measure similarity between vectors. Item vectors are represented as (num users)-dimensional vectors derived from the user-item interaction matrix, where component \\(d\\) represents how many times user \\(d\\) interacted with this item.
|
4 |
|
5 |
-
|
|
|
6 |
|
7 |
-
|
|
|
|
|
8 |
|
9 |
where:
|
10 |
|
@@ -12,15 +14,19 @@ where:
|
|
12 |
|
13 |
- \\(V\\) [num users \\(\times\\) num users]: user embedding matrix, where each row is:
|
14 |
|
15 |
-
\\(
|
16 |
|
17 |
- \\(A_i\\): set of \\(i\\)-th user's (interaction timestamp, item index) pairs
|
18 |
- \\(\max_t(i)\\): last \\(i\\)-th user's interaction timestamp
|
19 |
- \\(\tau\\): time decay coefficient (per second)
|
20 |
|
|
|
21 |
|
22 |
-
|
23 |
|
|
|
24 |
|
25 |
-
|
26 |
|
|
|
|
|
|
1 |
# ItemKNN
|
2 |
|
|
|
3 |
|
4 |
+
For this approach item vectors are represented as user-frequency [num users]-dimensional vectors constructed from the user-item interaction matrix \\(U\\).
|
5 |
+
\\(U_{ij}\\) indicates how many times user \\(i\\) interacted with the item \\(j\\).
|
6 |
|
7 |
+
### Similarity Measurement
|
8 |
+
|
9 |
+
We employ cosine similarity to measure similarity between vectors: \\(score(user_i, item_j) = \cos(V_i, U^\top_j)\\)
|
10 |
|
11 |
where:
|
12 |
|
|
|
14 |
|
15 |
- \\(V\\) [num users \\(\times\\) num users]: user embedding matrix, where each row is:
|
16 |
|
17 |
+
\\(V_{i} = \sum_{(t, k) \in A_i} \tau^{\max_t(i) - t} U^\top_{k}\\)
|
18 |
|
19 |
- \\(A_i\\): set of \\(i\\)-th user's (interaction timestamp, item index) pairs
|
20 |
- \\(\max_t(i)\\): last \\(i\\)-th user's interaction timestamp
|
21 |
- \\(\tau\\): time decay coefficient (per second)
|
22 |
|
23 |
+
For instance, when \\(\tau\\) is equal to 0 (which is the simplest case), Top-k recommendations are generated by retrieving the most closest (k) item embeddings to the latest user's representation.
|
24 |
|
25 |
+
### Hyperparameters
|
26 |
|
27 |
+
Parameter `hour` defines the time period (in hours) associated with a decay factor of 0.9.
|
28 |
|
29 |
+
### Implementation Note
|
30 |
|
31 |
+
For 5b-scale datasets, memory constraints arise when multiplying user-item interaction matrix \\(U\\) and the user embedding matrix making computations infeasible.
|
32 |
+
Thus, results for these datasets are not provided.
|