class_docstr: Implements the MovieLens Bandit environment.
  
  This environment implements the MovieLens 100K dataset, available at:
  https://www.kaggle.com/prajitdatta/movielens-100k-dataset
  
  This dataset contains 100K ratings from 943 users on 1682 items.
  This csv list of:
  user id | item id | rating | timestamp.
  This environment computes a low-rank matrix factorization (using SVD) of the
  data matrix A, such that: A ~= U * V.
  
  The reward of recommending item `j` to user `i` is provided as A_{ij}.
class_docstr_tok: ["Implements","the","MovieLens","Bandit","environment",".","This","environment","implements","the","MovieLens","100K","dataset",",","available","at",":","https",":","\/\/www.kaggle.com\/prajitdatta\/movielens-100k-dataset","This","dataset","contains","100K","ratings","from","943","users","on","1682","items",".","This","csv","list","of",":","user","id","|","item","id","|","rating","|","timestamp",".","This","environment","computes","a","low-rank","matrix","factorization","(","using","SVD",")","of","the","data","matrix","A",",","such","that",":","A","~=","U","*","V.","The","reward","of","recommending","item","`","j","`","to","user","`","i","`","is","provided","as","A_","{","ij","}","."]
docstr: Computes the reward for the input actions.
docstr_tok: ["Computes","the","reward","for","the","input","actions","."]
code: def _apply_action(self, action):
      """Computes the reward for the input actions."""
      rewards = []
      for i, j in zip(self._current_users, action):
          rewards.append(self._approx_ratings_matrix[i, j])
      return np.array(rewards)
  
file_path: agents/tf_agents/bandits/environments/movielens_py_environment.py
imports: from __future__ import absolute_import
  import random
  from typing import Optional, Text
  import gin
  import numpy
  from tf_agents.bandits.environments import bandit_py_environment
  from tf_agents.bandits.environments import dataset_utilities
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 5 for calling the MovieLensPyEnvironment obj's underlying member method code with example usage: obj._apply_action(action) and returns: np