docstr: Random recommendation for Rating Prediction
  
  This algorithm predicts ratings for each user-item
  
  Usage::
  
      >> RandomRec(train, test).compute()
  
  :param train_file: File which contains the train set. This file needs to have at least 3 columns
  (user item feedback_value).
  :type train_file: str
  
  :param test_file: File which contains the test set. This file needs to have at least 3 columns
  (user item feedback_value).
  :type test_file: str, default None
  
  :param uniform: Indicates whether the ratings are drawn from a uniform sample or not
  if False, the ratings are drawn from a normal distribution with the same mean and standard deviation
  as the feedback provided in train
  :type uniform: bool, default True
  
  :param output_file: File with dir to write the final predictions
  :type output_file: str, default None
  
  :param sep: Delimiter for input files
  :type sep: str, default '       '
  
  :param output_sep: Delimiter for output file
  :type output_sep: str, default '        '
  
  :param random_seed: Number of seed. Lock random numbers for reproducibility of experiments.
  :type random_seed: int, default None
docstr_tok: ["Random","recommendation","for","Rating","Prediction","This","algorithm","predicts","ratings","for","each","user-item","Usage",":",":",">",">","RandomRec","(","train",",","test",")",".compute","(",")",":","param","train_file",":","File","which","contains","the","train","set",".","This","file","needs","to","have","at","least","3","columns","(","user","item","feedback_value",")",".",":","type","train_file",":","str",":","param","test_file",":","File","which","contains","the","test","set",".","This","file","needs","to","have","at","least","3","columns","(","user","item","feedback_value",")",".",":","type","test_file",":","str",",","default","None",":","param","uniform",":","Indicates","whether","the","ratings","are","drawn","from","a","uniform","sample","or","not","if","False",",","the","ratings","are","drawn","from","a","normal","distribution","with","the","same","mean","and","standard","deviation","as","the","feedback","provided","in","train",":","type","uniform",":","bool",",","default","True",":","param","output_file",":","File","with","dir","to","write","the","final","predictions",":","type","output_file",":","str",",","default","None",":","param","sep",":","Delimiter","for","input","files",":","type","sep",":","str",",","default","'","'",":","param","output_sep",":","Delimiter","for","output","file",":","type","output_sep",":","str",",","default","'","'",":","param","random_seed",":","Number","of","seed",".","Lock","random","numbers","for","reproducibility","of","experiments",".",":","type","random_seed",":","int",",","default","None"]
code: def __init__(
      self,
      train_file,
      test_file,
      uniform=True,
      output_file=None,
      sep="\t",
      output_sep="\t",
      random_seed=None,
  ):
      """
      Random recommendation for Rating Prediction
  
      This algorithm predicts ratings for each user-item
  
      Usage::
  
          >> RandomRec(train, test).compute()
  
      :param train_file: File which contains the train set. This file needs to have at least 3 columns
      (user item feedback_value).
      :type train_file: str
  
      :param test_file: File which contains the test set. This file needs to have at least 3 columns
      (user item feedback_value).
      :type test_file: str, default None
  
      :param uniform: Indicates whether the ratings are drawn from a uniform sample or not
      if False, the ratings are drawn from a normal distribution with the same mean and standard deviation
      as the feedback provided in train
      :type uniform: bool, default True
  
      :param output_file: File with dir to write the final predictions
      :type output_file: str, default None
  
      :param sep: Delimiter for input files
      :type sep: str, default '\t'
  
      :param output_sep: Delimiter for output file
      :type output_sep: str, default '\t'
  
      :param random_seed: Number of seed. Lock random numbers for reproducibility of experiments.
      :type random_seed: int, default None
  
      """
  
      super(RandomRec, self).__init__(
          train_file=train_file,
          test_file=test_file,
          output_file=output_file,
          sep=sep,
          output_sep=output_sep,
      )
  
      if random_seed is not None:
          np.random.seed(random_seed)
  
      self.uniform = uniform
  
      self.recommender_name = "Random Recommender"
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/random_rec.py
imports: import numpy
  from caserec.recommenders.rating_prediction.base_rating_prediction import BaseRatingPrediction
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 1 to create a new RandomRec object from inherited base classes: BaseRatingPrediction with example: obj = RandomRec(train_file, test_file, uniform, output_file, sep, output_sep, random_seed)