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: Used when the ``PredictionImpossible`` exception is raised during a
  call to :meth:`predict()
  <surprise.prediction_algorithms.algo_base.AlgoBase.predict>`. By
  default, return the global mean of all ratings (can be overridden in
  child classes).
  
  Returns:
      (float): The mean of all ratings in the trainset.
docstr_tok: ["Used","when","the","``","PredictionImpossible","``","exception","is","raised","during","a","call","to",":","meth",":","`","predict","(",")","<","surprise.prediction_algorithms.algo_base.AlgoBase.predict",">","`",".","By","default",",","return","the","global","mean","of","all","ratings","(","can","be","overridden","in","child","classes",")",".","Returns",":","(","float",")",":","The","mean","of","all","ratings","in","the","trainset","."]
code: def default_prediction(self):
      """Used when the ``PredictionImpossible`` exception is raised during a
      call to :meth:`predict()
      <surprise.prediction_algorithms.algo_base.AlgoBase.predict>`. By
      default, return the global mean of all ratings (can be overridden in
      child classes).
  
      Returns:
          (float): The mean of all ratings in the trainset.
      """
  
      return self.trainset.global_mean
  
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 4 for calling the AlgoBase obj's underlying member method code with example usage: obj.default_prediction() and returns: self