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

Show the user recommendation #26

Open
AMG222 opened this issue Apr 7, 2022 · 0 comments
Open

Show the user recommendation #26

AMG222 opened this issue Apr 7, 2022 · 0 comments

Comments

@AMG222
Copy link

AMG222 commented Apr 7, 2022

I read your work, becosuse i want to create a RS using RL. I was interested in how i can print the user id of each recomendation obtanied?

from scipy.spatial import distance
import json
import pandas as pd
value_net  = recnn.nn.Critic(1290, 128, 256, 54e-2)
policy_net = recnn.nn.Actor(1290, 128, 256, 6e-1)
meta = json.load(open('omdb.json'))
recommendation = policy_net(state)
x = np.random.randint(0, state.size(0), 1)
recommendation = recommendation[x[0]].detach().cpu().numpy()
rank(recommendation, distance.euclidean)

I guess that the x is the index of the recommendation of a user having 1731 recommendations of 128 movies, but to know how good is the recommendation i want to know the user ID of each recommendation.
Thanks

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