Wrapping a NearestNeighborsModel in a recommender

User 481 | 10/1/2015, 3:28:13 PM

NearestNeighborsModel does not have a recommend function, so I usually query to get recommendations for all users into an SFrame and then basically filterby "userid" to get recommendations for particular user id. Is there some way to wrap a NNM into a recommender?


User 19 | 10/1/2015, 3:53:55 PM

Yes: you can use the nearest_items argument in an item_similarity_recommender model to directly use the nearest neighbors graph from a NearestNeighborsModel. The documentation for the argument for a real life example.

Please let us know if you have any questions! Chris

User 2466 | 10/22/2015, 4:18:55 PM

Hi @ChrisDuBois ,

Using composite distance, NearestNeighborsModel can be queried to generate a set of similar files.

How is this different from inputting the results of NearestNeighborsModel query into itemsimilarityrecommender as nearestitems, then querying for similar items via the getsimilar_items() function?