Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For neighborhood recommenders (ItemKNN and UserKNN) change the similarity calculation #5

Closed
arthurfortes opened this issue Oct 17, 2017 · 7 comments

Comments

@arthurfortes
Copy link
Member

arthurfortes commented Oct 17, 2017

For both approaches (rating prediction and item recommendation) change the value 1 for the maximum value in the distance matrix.

|Bug info: For measures that don't have the range (0-1) the values after transformation will be wrong.

@mayukh18
Copy link
Contributor

@arthurfortes I am taking this up.

@arthurfortes
Copy link
Member Author

You can use something like:

self.su_matrix = self.su_matrix.max() - self.su_matrix

@mayukh18
Copy link
Contributor

Considering this is similarity, I think it will better to keep it in 0-1 range, thus divide the result by max like self.su_matrix = (self.su_matrix.max() - self.su_matrix)/self.su_matrix.max(). What's your take on this?

@arthurfortes
Copy link
Member Author

It is an interesting and valid observation. If implemented, leave a comment in the code to make users aware. =)

@arthurfortes
Copy link
Member Author

Thx for the contribution. =)

@arthurfortes
Copy link
Member Author

Now, only item recommendation is missing =)

@mayukh18
Copy link
Contributor

Oh I thought it was only in rating prediction like you said. I'll send in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants