Surprise
Surprise copied to clipboard
How to find the compute_similarities() of neighbours in KNNMean() Algorithm
Description
I have implemented the KNNMean() algorithm for product recommendations. It is working fine and for the evaluation of the model, I have extracted the neighbors of each customer using algo.get_neighbors(toy_story_inner_id, k=10) function but I want to know the similarity score of each neighbor, how can I find the similarity score of the neighbors?
Versions
It's not supported but you can just copy paste the code of the get_neighbors
method and return the others
list right after this line:
https://github.com/NicolasHug/Surprise/blob/46b9914995e6c8c7d227b46f2eaeef2d4600580f/surprise/prediction_algorithms/algo_base.py#L285