-
This is a question by @levrone1987 : scikit-network version: 0.26.0 Description I am using your PageRank-based recommender, described at: https://scikit-network.readthedocs.io/en/latest/use_cases/recommendation.html What I Did So, for each user, I want to return a number of recommendations. However, since the number of users and items is large, the pagerank algorithm walks over the whole graph, meaning it would be prohibitive to use the approach in inference time. Could I somehow limit the walk to a local portion of the graph, given that I only need top-10 items? I thought about extracting a local graph for each user, and then perform pagerank, but I'm not sure it this is a clever way (and how I would approach it). Do you have an idea on how I might achieve a speedup? Any suggestion is highly welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
An option to speed up PageRank is to limit the number of iterations (see the Following your idea, you can also apply Louvain to the whole graph so as to get clusters (grouping users and items) and then apply PageRank to each cluster separately (say |
Beta Was this translation helpful? Give feedback.
An option to speed up PageRank is to limit the number of iterations (see the
n_iter
parameter).Following your idea, you can also apply Louvain to the whole graph so as to get clusters (grouping users and items) and then apply PageRank to each cluster separately (say
biadjacency[labels_row == label][:, labels_col == label]
for eachlabel
returned by Louvain). Note that the top-10 items recommended to a user will necessarily be part of the cluster of that user.