docstr: Method to evaluate the final ranking
  
  :param metrics: List of evaluation metrics
  :type metrics: list, default ('Prec', 'Recall', 'MAP, 'NDCG')
  
  :param verbose: Print the evaluation results
  :type verbose: bool, default True
  
  :param as_table: Print the evaluation results as table
  :type as_table: bool, default False
  
  :param table_sep: Delimiter for print results (only work with verbose=True and as_table=True)
  :type table_sep: str, default ' '
  
  :param n_ranks: List of positions to evaluate the ranking
  :type n_ranks: list, None
docstr_tok: ["Method","to","evaluate","the","final","ranking",":","param","metrics",":","List","of","evaluation","metrics",":","type","metrics",":","list",",","default","(","'Prec","'",",","'Recall","'",",","'MAP",",","'NDCG","'",")",":","param","verbose",":","Print","the","evaluation","results",":","type","verbose",":","bool",",","default","True",":","param","as_table",":","Print","the","evaluation","results","as","table",":","type","as_table",":","bool",",","default","False",":","param","table_sep",":","Delimiter","for","print","results","(","only","work","with","verbose=True","and","as_table=True",")",":","type","table_sep",":","str",",","default","'","'",":","param","n_ranks",":","List","of","positions","to","evaluate","the","ranking",":","type","n_ranks",":","list",",","None"]
code: def evaluate(
      self,
      metrics,
      verbose=True,
      as_table=False,
      table_sep="\t",
      n_ranks=None,
  ):
      """
      Method to evaluate the final ranking
  
      :param metrics: List of evaluation metrics
      :type metrics: list, default ('Prec', 'Recall', 'MAP, 'NDCG')
  
      :param verbose: Print the evaluation results
      :type verbose: bool, default True
  
      :param as_table: Print the evaluation results as table
      :type as_table: bool, default False
  
      :param table_sep: Delimiter for print results (only work with verbose=True and as_table=True)
      :type table_sep: str, default '\t'
  
      :param n_ranks: List of positions to evaluate the ranking
      :type n_ranks: list, None
  
      """
  
      self.evaluation_results = {}
  
      if metrics is None:
          metrics = list(["PREC", "RECALL", "MAP", "NDCG"])
  
      if n_ranks is None:
          n_ranks = list([1, 3, 5, 10])
  
      results = ItemRecommendationEvaluation(
          verbose=verbose,
          as_table=as_table,
          table_sep=table_sep,
          metrics=metrics,
          n_ranks=n_ranks,
      )
  
      self.evaluation_results = results.evaluate_recommender(
          predictions=self.ranking, test_set=self.test_set
      )
  
file_path: CaseRecommender/caserec/recommenders/item_recommendation/base_item_recommendation.py
imports: from scipy.spatial.distance import squareform, pdist
  import numpy
  from caserec.evaluation.item_recommendation import ItemRecommendationEvaluation
  from caserec.utils.extra_functions import print_header
  from caserec.utils.process_data import ReadFile, WriteFile
label_desc: Use image node_id 5 for calling the BaseItemRecommendation obj's underlying member method code with example usage: obj.evaluate(metrics, verbose, as_table, table_sep, n_ranks) without return types