Closed mayaKaplansky closed 3 years ago
The default config for that model tries to embed the class
field from ml-100k
(i.e., the genre(s)). Sidenote: I don't know why a default config file is specific to ml-100k
.
See: https://github.com/RUCAIBox/RecBole/blob/master/recbole/properties/model/GRU4RecF.yaml#L5
Try setting selected_features
to something else in your config. Afaik it only supports item features? Based on this line of your log
load_col={'inter': ['session_id', 'item_id', 'timestamp'], 'user': ['session_id', 'PatientLocationID', 'GenderID', 'AgeGroup', 'JobGroup']}
you don't have any item features yet. Need to load some
Hi Thank you. My data contains only user features which are actually session features, but no item features. If so, I cannot use GRU4rec nor GRU4recF? I couldn't figure out from the documentation whether there are other sequential models I can use in the RecBole library that do accept user features?
@mayaKaplansky GRU4Rec (no F) doesn't use any item features, so you could use that. As far as I'm aware GRU4RecF doesn't model the user at all, it only models sequences of (perhaps attributed) item interactions.
Looking through the code, it seems that DIN supports user features https://github.com/RUCAIBox/RecBole/blob/4c4838beac081e6e454d78cf76fb460b5b689413/recbole/model/layers.py#L777-L800
Not aware of any others in RecBole. I'm sure there are many possible algorithms in the literature that could be added, though! https://github.com/RUCAIBox/RecBole/discussions/611
Thank you! I need review the paper again and indeed its only item feature. Is there a way to create a sequential recommender with DIN?
Oops, I thought DIN was sequential. My mistake.
Then, I suppose RecBole has no sequential models which support user features :(
FWIW, it might be worth trying some other models (like contextual) which don't model time, in the temporal evaluation setting. You might be surprised that some can outperform models which do account for time. (At least, I've found this to be the case...)
Thanks! How can I figure out from documentation which model supports user features?
@mayaKaplansky I supposed you would like to implement session-based recommendation with user features, right?
If so, there is no such model that utilized user features for session-based recommendation in RecBole.
I think I have replied on the issue "Get a prediction" with one possibility: you first learned the session representation (just like GRU4RecF with no user features), and then combine it (the embedding encoding the sequence of the items in a session) with user representations (e.g., sum, concatenation or others. If you have multiple features, you can also design a MLP or more complicated architecture). If you would like to find some models with user features for reference, please refer to context-aware models, e.g., deep & wide (however, it seemed to be not explicitly with user features: it accepted general features, including user features).
For this purpose, you should make two attempts:
1) Try to load user features via .user file and can explicitly use these features in programs. (this is what you ask in a previous issue) 2) If this step is successful, you can design your own architecture for using user features (this can be implemented in full_sort and associated functions, which are discussed in a previous issue, too).
Hi I have been trying to run the GRU4recF model, but encounter an error. Let me know what additional info I can give to understand the issue and resolve it. Thanks!