Error build_user_features.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 724
- PR merge metrics
- No merged PRs in 30d
Description
Hello, im trying to create an user_feature matrix but i cant.
data = Dataset()
data.fit(users.user_id.unique(),items.movie_id.unique())
ad_subset = users[["sex_F", 'age','occupation_administrator']]
ad_list = [list(x) for x in ad_subset.values]
ad_tuple = tuple(zip(users['user_id'], ad_list))
user_features = data.build_user_features(ad_tuple)
I excetude the last code but i got this error
File "C:\ProgramData\Anaconda3\lib\site-packages\lightfm\data.py", line 101, in _process_features
"Feature {} not in eature mapping. " "Call fit first.".format(feature)
ValueError: Feature 0 not in eature mapping. Call fit first.
Can anybody help please?
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lightfm/data.py, especially build_user_features and _process_features, and review the reported call using Dataset.fit and the user feature tuples. Reproduce the ValueError with the example data, then determine whether the behavior is a library bug or an input/documentation issue; done requires a confirmed cause and a clear resolution path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100