Skip to content

Show the user recommendation #26

@AMG222

Description

@AMG222

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions