Correct way of creating Item/User features with Dataset class
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 724
- PR merge metrics
- No merged PRs in 30d
Description
Hi Maciej and everyone else :),
I am using LightFM in my school project with Yelp Academic dataset. I've looked at some previous issues, but I think that none of them were specifically describing what I was looking for (If I'm wrong, sorry for duplicate).
So, I want to incorporate item/user features and create them with `Dataset class`, but I don't know if I'm doing it right (I have created some and everthing seems working, but I don't know it is correct), because in Yelp dataset there are various types of feature values, lot of them are just `True/False` some are in given range or continuous `e.g. price range, or opening hours` and also categorical.
Currently I am creating or preparing features to be in collection of `(item id, [list of feature names])`.
Let's say I want to create features from columns `price_range (range 1-5), accept_credit_cards (bool), smoking_allowed (bool), category (str)`. The prepared collection of tuples for example:
```
[
(item1, [1, False, True, bar],
(item2, [4, True, False, restaurant],
(item3, [3, True, True, burgers],
...
]
```
My questions:
1. Is this way correct or not?
2. Will be position of `True/False` values from above taken into account or not (treated like values of two or more features)? Becaues I thing when passing all possible feature values to `fit` method of `Dataset` they will not.
3. Should I use second method which is described in docs (`(user id, {feature name: feature weight})`, but what than with categories?)
4. This one isn't related to my Dataset issue, but what are "sane" parameters when tuning performance of model (learning rate, components, epochs...), because one of my colleague told me that he doesn't use more than 40 components or epochs.
Thanks and have a nice day!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Dataset class documentation and the feature-building examples, then trace how fit receives feature names and weights. Clarify how boolean, numeric, and categorical values should be represented and document the supported approach, along with where model-tuning guidance belongs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100