-
Notifications
You must be signed in to change notification settings - Fork 132
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
reccomendFor empty array #35
Comments
How many ratings were there? Has user 1 already rated everything? — On Sat, Oct 10, 2015 at 8:47 PM, George Smeros notifications@github.com
|
i am looping a query and insert ratings . if i use then the users ratings and then recommend it works fine! but it seems that I have problems with async because I get out of memory and node keeps running 100%cpu. my code : connection.query('SELECT * FROM if it is a loop , where can I put the recommendFor ? |
I also tried this : |
Also the redis server keys * :
|
sorry for the trouble. I manage to fix mostly everything with alternative code. but it seems that my database ( 100.000 ratings from movielens ) is too big to uploaded into redis. It crashes after 13-14k entries |
it looks like every set should be able to hold 2^32, sure that's it? what was the fix? thanks for keeping me in the loop! On Tue, Oct 13, 2015 at 10:11 AM, George Smeros notifications@github.com
Guy Morita T 206.240.5846 l guymorita@gmail.com guymorita@gmail.com LinkedIn http://www.linkedin.com/in/guymorita l Github |
If I use this if statement and then try to recommendFor in the callback it doesnt work. Redis is still storing in the background. So what I did i am just trying to put everything up from my training dataset into redis.(Stops at 13k keys) then with every like/dislike of the user I return the updated recommendset. I think maybe Redis can handle the request but node is crashing while it tries to store. Probably a memory issue in my end , but the macbook I am using has no problems... |
I used a remote server and in a 100.000 ratings table (movie lens) I got 13.8k keys into redis. is this correct ? does this count movieIds only ? |
Same thing happened to me, I simply put code in my test that was displayed in the example. I logged into my redis server and made sure that the keys do exist. Here is the code i have. NOTE: I'm connecting to a docker container by the docker machine ip address so its a remote connection var expect = require('chai').expect;
var raccoon = require('raccoon');
raccoon.connect(6379, '192.168.99.100');
describe('this doesnt work', function() {
before(function(done) {
raccoon.flush();
done();
});
before(function(done) {
raccoon.liked('garyId', 'movieId');
raccoon.liked('garyId', 'movie2Id');
raccoon.liked('chrisId', 'movieId');
done();
});
it('should show movie2', function(done) {
raccoon.recommendFor('chrisId', 10, function(results) {
console.log(results, 'results'); // empty array returned
expect(true).to.eq(false);
done();
})
});
}) |
@joshbedo I updated the readme to show that the liked /disliked calls are async. They now use promises. So if you call recommendFor before they resolve, you won't get any recommendations. |
@gsmeros I'm going to try the Movielens database as well and I'll let you know what the results are! For every user there are: For every item there are: Others include: |
No description provided.
The text was updated successfully, but these errors were encountered: