Skip to content
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

How to predict for new users? #2

Open
levalencia opened this issue Mar 18, 2022 · 0 comments
Open

How to predict for new users? #2

levalencia opened this issue Mar 18, 2022 · 0 comments

Comments

@levalencia
Copy link

Great package, I was able to run it and do a prediction for an existing user:

scores = model.predict(user_ids=6, item_ids=[1,2,3,5,6])
print(scores)

However, I would like to know how to make predictions for new users (cold start), I am not able to find documentation here or on light fm about how do it.

I tried this

new_user_feature = [8,{'name:John', 'Age:33', 'los:IFS','ou:development', 'skills:sql'} ]    
new_user_feature = [8,new_user_feature]

#predict new users User-Id	name	age	los	ou	gender	skills
model.predict(0, item_ids=[1,2,3,5,6], user_features=new_user_feature)

But I get this error:

<1 sec
AttributeError: 'list' object has no attribute 'tocsr'

any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant