docstr: Class to evaluate predictions in a rating prediction scenario
  
  :param sep: Delimiter for input files
  :type sep: str, default '       '
  
  :param metrics: List of evaluation metrics
  :type metrics: list, default ('MAE', 'RMSE')
  
  :param all_but_one_eval: If True, considers only one pair (u, i) from the test set to evaluate the ranking
  :type all_but_one_eval: bool, default False
  
  :param verbose: Print the evaluation results
  :type verbose: bool, default True
  
  :param as_table: Print the evaluation results as table (only work with verbose=True)
  :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 as_rank: If True, evaluate as rank.
  :type as_rank: bool, default False
docstr_tok: ["Class","to","evaluate","predictions","in","a","rating","prediction","scenario",":","param","sep",":","Delimiter","for","input","files",":","type","sep",":","str",",","default","'","'",":","param","metrics",":","List","of","evaluation","metrics",":","type","metrics",":","list",",","default","(","'MAE","'",",","'RMSE","'",")",":","param","all_but_one_eval",":","If","True",",","considers","only","one","pair","(","u",",","i",")","from","the","test","set","to","evaluate","the","ranking",":","type","all_but_one_eval",":","bool",",","default","False",":","param","verbose",":","Print","the","evaluation","results",":","type","verbose",":","bool",",","default","True",":","param","as_table",":","Print","the","evaluation","results","as","table","(","only","work","with","verbose=True",")",":","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","as_rank",":","If","True",",","evaluate","as","rank",".",":","type","as_rank",":","bool",",","default","False"]
code: def __init__(
      self,
      sep="\t",
      metrics=list(["MAE", "RMSE"]),
      all_but_one_eval=False,
      verbose=True,
      as_table=False,
      table_sep="\t",
      as_rank=False,
      n_rank=(5, 10),
  ):
      """
      Class to evaluate predictions in a rating prediction scenario
  
      :param sep: Delimiter for input files
      :type sep: str, default '\t'
  
      :param metrics: List of evaluation metrics
      :type metrics: list, default ('MAE', 'RMSE')
  
      :param all_but_one_eval: If True, considers only one pair (u, i) from the test set to evaluate the ranking
      :type all_but_one_eval: bool, default False
  
      :param verbose: Print the evaluation results
      :type verbose: bool, default True
  
      :param as_table: Print the evaluation results as table (only work with verbose=True)
      :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 as_rank: If True, evaluate as rank.
      :type as_rank: bool, default False
  
      """
  
      super(RatingPredictionEvaluation, self).__init__(
          sep=sep,
          metrics=metrics,
          all_but_one_eval=all_but_one_eval,
          verbose=verbose,
          as_table=as_table,
          table_sep=table_sep,
      )
      self.as_rank = as_rank
      self.n_rank = n_rank
  
file_path: CaseRecommender/caserec/evaluation/rating_prediction.py
imports: from sklearn.metrics import mean_absolute_error, mean_squared_error
  import numpy
  import random
  from caserec.evaluation.item_recommendation import ItemRecommendationEvaluation
  from caserec.evaluation.base_evaluation import BaseEvaluation
label_desc: Use image node_id 1 to create a new RatingPredictionEvaluation object from inherited base classes: BaseEvaluation with example: obj = RatingPredictionEvaluation(sep, metrics, all_but_one_eval, verbose, as_table, table_sep, as_rank, n_rank)