class_docstr: The abstract class for Turi Create recommender system models. This class
  defines methods common to all recommender system models, but leaves unique
  model details to separate model classes.
class_docstr_tok: ["The","abstract","class","for","Turi","Create","recommender","system","models",".","This","class","defines","methods","common","to","all","recommender","system","models",",","but","leaves","unique","model","details","to","separate","model","classes","."]
docstr: Compute a model's precision and recall scores for a particular dataset.
  
  Parameters
  ----------
  dataset : SFrame
      An SFrame in the same format as the one used during training.
      This will be compared to the model's recommendations, which exclude
      the (user, item) pairs seen at training time.
  
  cutoffs : list, optional
      A list of cutoff values for which one wants to evaluate precision
      and recall, i.e. the value of k in "precision at k".
  
  skip_set : SFrame, optional
      Passed to :meth:`recommend` as ``exclude``.
  
  exclude_known : bool, optional
      Passed to :meth:`recommend` as ``exclude_known``. If True, exclude
      training item from recommendation.
  
  verbose : bool, optional
      Enables verbose output. Default is verbose.
  
  **kwargs
      Additional keyword arguments are passed to the recommend
      function, whose returned recommendations are used for evaluating
      precision and recall of the model.
  
  Returns
  -------
  out : dict
      Contains the precision and recall at each cutoff value and each
      user in ``dataset``.
  
  Examples
  --------
  
  >>> import turicreate as tc
  >>> sf = tc.SFrame('https://static.turi.com/datasets/audioscrobbler')
  >>> train, test = tc.recommender.util.random_split_by_user(sf)
  >>> m = tc.recommender.create(train)
  >>> m.evaluate_precision_recall(test)
  
  See Also
  --------
  turicreate.recommender.util.precision_recall_by_user
docstr_tok: ["Compute","a","model","'s","precision","and","recall","scores","for","a","particular","dataset",".","Parameters","--","--","--","--","--","dataset",":","SFrame","An","SFrame","in","the","same","format","as","the","one","used","during","training",".","This","will","be","compared","to","the","model","'s","recommendations",",","which","exclude","the","(","user",",","item",")","pairs","seen","at","training","time",".","cutoffs",":","list",",","optional","A","list","of","cutoff","values","for","which","one","wants","to","evaluate","precision","and","recall",",","i.e",".","the","value","of","k","in","``","precision","at","k","''",".","skip_set",":","SFrame",",","optional","Passed","to",":","meth",":","`","recommend","`","as","``","exclude","``",".","exclude_known",":","bool",",","optional","Passed","to",":","meth",":","`","recommend","`","as","``","exclude_known","``",".","If","True",",","exclude","training","item","from","recommendation",".","verbose",":","bool",",","optional","Enables","verbose","output",".","Default","is","verbose",".","*","*","kwargs","Additional","keyword","arguments","are","passed","to","the","recommend","function",",","whose","returned","recommendations","are","used","for","evaluating","precision","and","recall","of","the","model",".","Returns","--","--","--","-","out",":","dict","Contains","the","precision","and","recall","at","each","cutoff","value","and","each","user","in","``","dataset","``",".","Examples","--","--","--","--",">",">",">","import","turicreate","as","tc",">",">",">","sf","=","tc.SFrame","(","'https",":","\/\/static.turi.com\/datasets\/audioscrobbler","'",")",">",">",">","train",",","test","=","tc.recommender.util.random_split_by_user","(","sf",")",">",">",">","m","=","tc.recommender.create","(","train",")",">",">",">","m.evaluate_precision_recall","(","test",")","See","Also","--","--","--","--","turicreate.recommender.util.precision_recall_by_user"]
code: def evaluate_precision_recall(
      self,
      dataset,
      cutoffs=list(range(1, 11, 1)) + list(range(11, 50, 5)),
      skip_set=None,
      exclude_known=True,
      verbose=True,
      **kwargs,
  ):
      """
      Compute a model's precision and recall scores for a particular dataset.
  
      Parameters
      ----------
      dataset : SFrame
          An SFrame in the same format as the one used during training.
          This will be compared to the model's recommendations, which exclude
          the (user, item) pairs seen at training time.
  
      cutoffs : list, optional
          A list of cutoff values for which one wants to evaluate precision
          and recall, i.e. the value of k in "precision at k".
  
      skip_set : SFrame, optional
          Passed to :meth:`recommend` as ``exclude``.
  
      exclude_known : bool, optional
          Passed to :meth:`recommend` as ``exclude_known``. If True, exclude
          training item from recommendation.
  
      verbose : bool, optional
          Enables verbose output. Default is verbose.
  
      **kwargs
          Additional keyword arguments are passed to the recommend
          function, whose returned recommendations are used for evaluating
          precision and recall of the model.
  
      Returns
      -------
      out : dict
          Contains the precision and recall at each cutoff value and each
          user in ``dataset``.
  
      Examples
      --------
  
      >>> import turicreate as tc
      >>> sf = tc.SFrame('https://static.turi.com/datasets/audioscrobbler')
      >>> train, test = tc.recommender.util.random_split_by_user(sf)
      >>> m = tc.recommender.create(train)
      >>> m.evaluate_precision_recall(test)
  
      See Also
      --------
      turicreate.recommender.util.precision_recall_by_user
      """
  
      user_column = self.user_id
      item_column = self.item_id
      assert (
          user_column in dataset.column_names()
          and item_column in dataset.column_names()
      ), "Provided data set must have a column pertaining to user ids and \
               item ids, similar to what we had during training."
  
      dataset = self.__prepare_dataset_parameter(dataset)
  
      users = dataset[self.user_id].unique()
  
      dataset = dataset[[self.user_id, self.item_id]]
  
      recs = self.recommend(
          users=users,
          k=max(cutoffs),
          exclude=skip_set,
          exclude_known=exclude_known,
          verbose=verbose,
          **kwargs,
      )
  
      precision_recall_by_user = (
          self.__proxy__.precision_recall_by_user(
              dataset, recs, cutoffs
          )
      )
  
      ret = {"precision_recall_by_user": precision_recall_by_user}
  
      pr_agg = precision_recall_by_user.groupby(
          "cutoff",
          operations={
              "precision": _Aggregate.MEAN("precision"),
              "recall": _Aggregate.MEAN("recall"),
          },
      )
  
      pr_agg = pr_agg[["cutoff", "precision", "recall"]]
      ret["precision_recall_overall"] = pr_agg.sort("cutoff")
  
      return ret
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  import random
  import array
  import logging
  import time
  import six
  from turicreate.toolkits import _coreml_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._model import Model
  from turicreate.toolkits._internal_utils import _toolkit_repr_print, _precomputed_field
  import turicreate.aggregate
  from turicreate.data_structures.sarray import SArray
  from turicreate.data_structures.sframe import SFrame
  from turicreate._deps import numpy, HAS_NUMPY
label_desc: Use image node_id 18 for calling the _Recommender obj's underlying member method code with example usage: obj.evaluate_precision_recall(dataset, cutoffs, skip_set, exclude_known, verbose) and returns: ret