Closed ibuda closed 3 years ago
Hi @statisticianinstilettos,
kudos for a great tool! I would like to propose an optimization for calculating Personalization Metric here:
#get indicies for upper right triangle w/o diagonal upper_right = np.triu_indices(similarity.shape[0], k=1) #calculate average similarity personalization = np.mean(similarity[upper_right]) return 1-personalization
There is no need to get the upper triangle indices, as the cosine similarity is a symmetric distance. I will follow up with a pull request for this.
great update! Thanks
Hi @statisticianinstilettos,
kudos for a great tool! I would like to propose an optimization for calculating Personalization Metric here:
There is no need to get the upper triangle indices, as the cosine similarity is a symmetric distance. I will follow up with a pull request for this.