hand10ryo / PyTorchCML

PyTorchCML is a library of PyTorch implementations of matrix factorization (MF) and collaborative metric learning (CML), algorithms used in recommendation systems and data mining.
MIT License
20 stars 2 forks source link

Any way to get user-user, item-item and user-item embeddings back from trained model? #45

Open shivamtundele opened 1 year ago

shivamtundele commented 1 year ago

Hello, like LightFM algorithm, is it possible to retrieve user-user, item-item and user-item embeddings back from the trained model?

hand10ryo commented 1 year ago

PyTorchCML does not have a mechanism to retrieve. You can retrieve the embedding vector by model.user_embeddings.weight or model.item_embeddings.weight. One of the easiest ways to achieve retrieving would be to enter it into another library such as Annoy.