class_docstr: Abstract class where is defined the basic behavior of a prediction
  algorithm.
  
  Keyword Args:
      baseline_options(dict, optional): If the algorithm needs to compute a
          baseline estimate, the ``baseline_options`` parameter is used to
          configure how they are computed. See
          :ref:`baseline_estimates_configuration` for usage.
class_docstr_tok: ["Abstract","class","where","is","defined","the","basic","behavior","of","a","prediction","algorithm",".","Keyword","Args",":","baseline_options","(","dict",",","optional",")",":","If","the","algorithm","needs","to","compute","a","baseline","estimate",",","the","``","baseline_options","``","parameter","is","used","to","configure","how","they","are","computed",".","See",":","ref",":","`","baseline_estimates_configuration","`","for","usage","."]
docstr: Test the algorithm on given testset, i.e. estimate all the ratings
  in the given testset.
  
  Args:
      testset: A test set, as returned by a :ref:`cross-validation
          itertor<use_cross_validation_iterators>` or by the
          :meth:`build_testset() <surprise.Trainset.build_testset>`
          method.
      verbose(bool): Whether to print details for each predictions.
          Default is False.
  
  Returns:
      A list of :class:`Prediction            <surprise.prediction_algorithms.predictions.Prediction>` objects
      that contains all the estimated ratings.
docstr_tok: ["Test","the","algorithm","on","given","testset",",","i.e",".","estimate","all","the","ratings","in","the","given","testset",".","Args",":","testset",":","A","test","set",",","as","returned","by","a",":","ref",":","`","cross-validation","itertor","<","use_cross_validation_iterators",">","`","or","by","the",":","meth",":","`","build_testset","(",")","<","surprise.Trainset.build_testset",">","`","method",".","verbose","(","bool",")",":","Whether","to","print","details","for","each","predictions",".","Default","is","False",".","Returns",":","A","list","of",":","class",":","`","Prediction","<","surprise.prediction_algorithms.predictions.Prediction",">","`","objects","that","contains","all","the","estimated","ratings","."]
code: def test(self, testset, verbose=False):
      """Test the algorithm on given testset, i.e. estimate all the ratings
          in the given testset.
  
          Args:
              testset: A test set, as returned by a :ref:`cross-validation
                  itertor<use_cross_validation_iterators>` or by the
                  :meth:`build_testset() <surprise.Trainset.build_testset>`
                  method.
              verbose(bool): Whether to print details for each predictions.
                  Default is False.
  
          Returns:
              A list of :class:`Prediction\
              <surprise.prediction_algorithms.predictions.Prediction>` objects
              that contains all the estimated ratings.
          """
  
      # The ratings are translated back to their original scale.
      predictions = [
          self.predict(uid, iid, r_ui_trans, verbose=verbose)
          for (uid, iid, r_ui_trans) in testset
      ]
      return predictions
  
file_path: Surprise/surprise/prediction_algorithms/algo_base.py
imports: import heapq
  from ..None import similarities
  from .optimize_baselines import baseline_als, baseline_sgd
  from .predictions import Prediction, PredictionImpossible
label_desc: Use image node_id 5 for calling the AlgoBase obj's underlying member method code with example usage: obj.test(testset, verbose) and returns: predictions