Item-item recommendation based on cosine similarity
问题 As a part of a recommender system that I am building, I want to implement a item-item recommendation based on cosine similarity. Ideally, I would like to compute the cosine similarity on 1 million items represented by a DenseVector of 2048 features in order to get the top-n most similar items to a given one. My problem is that the solutions I've come across perform poorly on my dataset. I've tried : Calculating the cosine similarity between all the rows of a dataframe in pyspark Using