code: def predict_scores(self, user, unpredicted_items):
      predictions = []
  
      # predict score for item_i
      for item_j in unpredicted_items:
          item_j_id = self.item_to_item_id[item_j]
          rui = 0
          sim_sum = 0
  
          neighbors_list = []
          for item in self.train_set["items_seen_by_user"][user]:
              neighbors_list.append(
                  (
                      item,
                      self.si_matrix[
                          item_j_id, self.item_to_item_id[item]
                      ],
                      self.train_set["feedback"][user][item],
                  )
              )
  
          neighbors_list = sorted(neighbors_list, key=lambda x: -x[1])[
              :: self.k_neighbors
          ]
  
          if neighbors_list:
              for triple in neighbors_list:
                  rui += (
                      (triple[2] - self.bui[user][triple[0]])
                      * triple[1]
                      if triple[1] != 0
                      else 0.001
                  )
                  sim_sum += triple[1] if triple[1] != 0 else 0.001
  
              rui = self.bui[user][item_j] + (rui / sim_sum)
  
          else:
              rui = self.bui[user][item_j]
  
          # normalize the ratings based on the highest and lowest value.
          if rui > self.train_set["max_value"]:
              rui = self.train_set["max_value"]
          if rui < self.train_set["min_value"]:
              rui = self.train_set["min_value"]
  
          predictions.append((user, item_j, rui))
  
      return sorted(predictions, key=lambda x: x[1])
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/itemknn.py
imports: from collections import defaultdict
  import numpy
  from caserec.utils.extra_functions import timed
  from caserec.recommenders.rating_prediction.base_knn import BaseKNN
label_desc: Use image node_id 4 for calling the ItemKNN obj's underlying member method code with example usage: obj.predict_scores(user, unpredicted_items) and returns: sorted