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

UserKNN #10

Closed
asuresh1 opened this issue Mar 6, 2018 · 5 comments
Closed

UserKNN #10

asuresh1 opened this issue Mar 6, 2018 · 5 comments

Comments

@asuresh1
Copy link

asuresh1 commented Mar 6, 2018

in the method predict_similar_first_scores the common_users probably need to be looked at.
Currently with a small test data
[[0. 1. 1.]
[1. 1. 1.]
[1. 0. 0.]
[1. 1. 0.]]
Where 1 indicates seen item and zero indicates not seen. common_users is outputting a null list.
Correct me if i am wrong I thing it should be
common_users = list(set(self.users_id_viewed_item.get(self.items[item], [])).
intersection(neighbors[1:self.k_neighbors]))

common_users = list(set(self.users_id_viewed_item.get(item, [])).
intersection(neighbors[1:self.k_neighbors]))

@arthurfortes
Copy link
Member

Hi, Suresh!

You're right. Items in u_list are represented as index.

If you can, pull the request.

Thanks for your attention!

@arthurfortes
Copy link
Member

Problem fixed in the new version.

@asuresh1
Copy link
Author

asuresh1 commented Apr 5, 2018

Sorry for this, got busy with something else. I was thinking for creating the ensemble, the scores in each of the recommenders need to out a score in the same range.
Suggestion is to normalize the scores from 0 to 1 after sorting so the first item to be recommended by any of the algorithm would have a 1. So as to create an ensemble model the scores for each item might have to a dictionary. Correct me if i am wrong. We can chat over skype or something , my email and skype id is suresh.aswathnarayana@live.com.

@arthurfortes
Copy link
Member

Hi, Suresh!

How are you?

I'm very busy this month. I just got back from a conference trip. I'll get organized and I'll get back to you soon to talk. Sorry for the delay.

My skype: fortes-arthur@hotmail.com

Regards.

@arthurfortes
Copy link
Member

'Suggestion is to normalize the scores from 0 to 1 after sorting so the first item to be recommended by any of the algorithm would have a 1.' I did this in my ensemble algorithms, which I thought was more logical. Remembering that I make this approach to the ranking of each user isolated.

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

No branches or pull requests

2 participants