Datasets:

Modalities:
Tabular
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
pandas
License:
tytskiy's picture
Update benchmarks/models/itemknn/README.md (#9)
3e159c8 verified

ItemKNN

For this approach item vectors are represented as user-frequency [num users]-dimensional vectors constructed from the user-item interaction matrix UU. UijU_{ij} indicates how many times user ii interacted with the item jj.

Similarity Measurement

We employ cosine similarity to measure similarity between vectors: score(useri,itemj)=cos⁑(Vi,Uj⊀)score(user_i, item_j) = \cos(V_i, U^\top_j)

where:

  • UU [num user Γ—\times num items]: original user-item interaction matrix

  • VV [num users Γ—\times num users]: user embedding matrix, where each row is:

    Vi=βˆ‘(t,k)∈AiΟ„max⁑t(i)βˆ’tUk⊀V_{i} = \sum_{(t, k) \in A_i} \tau^{\max_t(i) - t} U^\top_{k}

    • AiA_i: set of ii-th user's (interaction timestamp, item index) pairs
    • max⁑t(i)\max_t(i): last ii-th user's interaction timestamp
    • Ο„\tau: time decay coefficient (per second)

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.

Hyperparameters

Parameter hour defines the time period (in hours) associated with a decay factor of 0.9.

Implementation Note

For 5b-scale datasets, memory constraints arise when multiplying user-item interaction matrix UU and the user embedding matrix making computations infeasible. Thus, results for these datasets are not provided.