/dgl-itemrec

Item embedding & item-based recsys with DGL

Primary LanguagePython

Item-based recommendation example with DGL

Model description

We currently implement two models on MovieLens-1M.

The first one is an unsupervised item-embedding learning model, where the item embeddings are computed from PinSage on the user-item interaction graph. The item embeddings are optimized so that the dot product of two item embeddings are maximized if they are interacted by the same user, and minimized otherwise.

Once learned, top-K recommendation are generated by comparing the item embedding with the latest item the user has interacted with, and selecting K items with the largest dot product.

$ python main_knn.py

The second one is based on FISM, except that the item embeddings are again computed by PinSage.

$ python main_fism.py

Arguments

  • --id-as-feature: whether to treat item ID as a feature.