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

Question about update coord in JokeRec/step in rayrllib/recsys/01-Recsys.ipynb #77

Open
jamesliu opened this issue Dec 24, 2021 · 0 comments

Comments

@jamesliu
Copy link

centers dimension is like [clusters, users], c dimension will become [users], why do we get c[item]?
For example, if we have cluster =7, users=2000, items=101, shouldn't we get c[user] instead of c[item]?

class JokeRec (gym.Env):
def step(self):
...
# update the coords history: agent observes its distance to each cluster "evolve"
for i in range(len(self.coords)):
c = self.centers[i]
scaled_diff = abs(c[item] - rating) / 2.0
self.coords[i] += scaled_diff ** 2.0

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