Surprise
Surprise copied to clipboard
Add adjusted cosine similarity
As discussed in #135, it would be interesting to add support for the adjusted cosine similarity.
Adjusted cosine is similar to pearson similarity, only the centering differs (for a user-user similarity, we center with the item average instead of with the respective user averages).
Is this issue still open ? Is there someone already working on it ?
Yes it's still open so you're welcome to try if you want to. Don't forget to check the contributing guidelines :)
Ok that is cool.
But it seems like there is already an implementation for it following the discussion in the issue #135 ??!!
There's no PR related to adjusted cosine so you can go for it. One of the open PRs is related #164, but even then, it's only partially addressed.
Just to make it clear: implementing adjusted cosine should be done here only considering common ratings. I am aware that adjusted cosine is rather commonly computed on the whole ratings, but that can be dealt with once we address #164.
Ok. Just to get it right, this would be similar to the actual implementation of cosine similiraty with common_ratings_only=True but with the shift at the mean right ?
this would be similar to the actual implementation of cosine similiraty
Yes, but adjusted cosine is even closer to pearson similarity.
with common_ratings_only=True
There is no common_ratings_only
option for now, because similarities are always computed using common ratings. This option will come once we address #164.
Ok. I'll try to submit a PR ASAP.
Le lun. 30 avr. 2018 à 13:41, Nicolas Hug [email protected] a écrit :
this would be similar to the actual implementation of cosine similiraty
Yes, but adjusted cosine is even closer to pearson similarity.
with common_ratings_only=True
There is no common_ratings_only option for now, because similarities are always computed using common ratings. This option will come once we address #164 https://github.com/NicolasHug/Surprise/issues/164.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NicolasHug/Surprise/issues/163#issuecomment-385374643, or mute the thread https://github.com/notifications/unsubscribe-auth/ATl3ioOyVPFd8XiYD8N3RtJ3LytvUnKmks5ttvh9gaJpZM4TFU5W .
hey there I'm new here, Is there any one to help me? I want to add a new similarity measure but there are already some bugs in the similarities.pyx how can I use it? how can I fix it?
@ghazalaak please don't highjack unrelated issues. Open a new one if you need to (you'll have to be a lot more specific though).