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
Building datasets #318
Comments
This is the expected result. By default, LightFM adds a feature per every user and item. You can disable that in the constructor. |
(Well, you should get 160000 x 1600300 or something like that. Are your feature names the same as some of your user ids?) |
Oh ok. No, none of my features names are the same as user ids. |
What data are you passing as (So if you have 300 user features it should be 300 long). |
I misunderstood this line in the example : I was trying to do the same thing, obviously the wrong way. by modifying using just the name, I have the right result. Thank you ! |
Sorry to re-open this, but after that I continued by building the users/items features (always following the example and the documentation):
Like in the documentation :
Example:
Is it the excepted result ? If yes, I think I don't really understand how the user features matrix is build and how it's different from the collaborative filtering. |
You need to pass an iterable of tuples of |
At the moment I pass the user features name in fact, that what I read in the doc.
but it did change a thing :( |
Are you passing features for the second user? Is the resulting matrix an identity matrix? Can you post a short gist that reproduces this? It may be useful to print some of the elements in your iterator and make sure that they are what you think they are. Is |
(If you think the docs are unclear on this point please make a PR with improvements.) |
One more pointer: if you are using generators, you can only iterate over a generator once: subsequent iterations will yield zero elements. Maybe you are creating one csv reader, using it for |
Sorry for late answer, I no longer had access to the data. I didn't normalized my values, just used the parameter |
If all users have the same number of features the value on the diagonal will be the same for all of them. |
Got it. thanks a lot, I really really appreciated your help. |
Hi Maciej, class lightfm.LightFM(no_components=10, k=5, n=10, learning_schedule=’adagrad’, loss=’logistic’, learning_rate=0.05, rho=0.95, epsilon=1e-06, item_alpha=0.0, user_alpha=0.0, max_sampled=10, random_state=None) |
It's possible to pass more than one user feature for each user?
|
Hello !
Thank you for this open source package, it help a lot and your work is amazing.
I just a have a silly question about dataset construction. I followed the example for my data:
user (160.000 x 300) and item (4000 x 4).
But when I try
dataset.user_features_shape()
I get(160000, 160000)
. shouldn't I rather have this(160000, 300)
?Indeed, we can read in the documentation :
and my num user features is 300. So there is an error in what I did?
Sorry for the stupid question!
The text was updated successfully, but these errors were encountered: