I have a graph wherein users have specific characteristics and these users have rated some products.
Step 1 - Filter out all the similar users to one particular user based on their characteristics. For example user A is looking for a recommendation and there is info for 10 users B,C,D,E,F,G,H,I,J,K. The 5 users most similar to A are C,D,E,F,J.
Step 2 - Run a centrality algorithm to find the most popular products but the algorithm should only take into account the information for users C,D,E,F and J (top 5 users).
Can someone help me with how I can filter for these top 5 users. What I could think of is adding an addition label/property to the top 5 users but that would alter the graph. Any help Is greatly appreciated.