code: def eval_random_ranks_on_dataset(
      interactions, recall_k=30, precision_k=5, ndcg_k=30
  ):
      n_users, n_items = interactions.shape
  
      random_guesses = np.array(
          [
              np.random.choice(a=n_items, size=n_items, replace=False)
              + 1
              for _ in range(n_users)
          ]
      )
  
      p_at_k = precision_at_k(
          random_guesses, interactions, k=precision_k
      )
      r_at_k = recall_at_k(random_guesses, interactions, k=recall_k)
      n_at_k = ndcg_at_k(random_guesses, interactions, k=ndcg_k)
  
      return np.mean(r_at_k), np.mean(p_at_k), np.mean(n_at_k)
  
file_path: tensorrec/tensorrec/eval.py
imports: import numpy
  import scipy.sparse
  from .tensorrec import TensorRec
label_desc: Use image node_id 10 for calling a global function with example usage: eval_random_ranks_on_dataset(interactions, recall_k, precision_k, ndcg_k) and returns: np,  np,  np