class_docstr: A model that ranks an item according to its similarity to other items
  observed for the user in question.
  
  **Creating an ItemSimilarityRecommender**
  
  This model cannot be constructed directly.  Instead, use
  :func:`turicreate.recommender.item_similarity_recommender.create`
  to create an instance
  of this model. A detailed list of parameter options and code samples
  are available in the documentation for the create function.
  
  Notes
  -----
  **Model Definition**
  
  This model first computes the similarity
  between items using the observations of users who have interacted with both
  items. Given a similarity between item :math:`i` and :math:`j`,
  :math:`S(i,j)`, it scores an item :math:`j` for user :math:`u` using a
  weighted average of the user's previous observations :math:`I_u`.
  
  There are three choices of similarity metrics to use: 'jaccard',
  'cosine' and 'pearson'.
  
  `Jaccard similarity
  <http://en.wikipedia.org/wiki/Jaccard_index>`_
  is used to measure the similarity between two set of elements.
  In the context of recommendation, the Jaccard similarity between two
  items is computed as
  
  .. math:: \mbox{JS}(i,j)
          = \frac{|U_i \cap U_j|}{|U_i \cup U_j|}
  
  where :math:`U_{i}` is the set of users who rated item :math:`i`.
  Jaccard is a good choice when one only has implicit feedbacks of items
  (e.g., people rated them or not), or when one does not care about how
  many stars items received.
  
  If one needs to compare the ratings of items, Cosine and Pearson similarity
  are recommended.
  
  The Cosine similarity between two items is computed as
  
  .. math:: \mbox{CS}(i,j)
          = \frac{\sum_{u\in U_{ij}} r_{ui}r_{uj}}
              {\sqrt{\sum_{u\in U_{i}} r_{ui}^2}
               \sqrt{\sum_{u\in U_{j}} r_{uj}^2}}
  
  where :math:`U_{i}` is the set of users who rated item :math:`i`,
  and :math:`U_{ij}` is the set of users who rated both items :math:`i` and
  :math:`j`. A problem with Cosine similarity is that it does not consider
  the differences in the mean and variance of the ratings made to
  items :math:`i` and :math:`j`.
  
  Another popular measure that compares ratings where the effects of means and
  variance have been removed is Pearson Correlation similarity:
  
  .. math:: \mbox{PS}(i,j)
          = \frac{\sum_{u\in U_{ij}} (r_{ui} - \bar{r}_i)
                                      (r_{uj} - \bar{r}_j)}
              {\sqrt{\sum_{u\in U_{ij}} (r_{ui} - \bar{r}_i)^2}
               \sqrt{\sum_{u\in U_{ij}} (r_{uj} - \bar{r}_j)^2}}
  
  The predictions of items depend on whether `target` is specified.
  When the `target` is absent, a prediction for item :math:`j` is made via
  
  .. math:: y_{uj}
          = \frac{\sum_{i \in I_u} \mbox{SIM}(i,j)  }{|I_u|}
  
  
  Otherwise, predictions for ``jaccard`` and ``cosine`` similarities are made via
  
  .. math:: y_{uj}
          = \frac{\sum_{i \in I_u} \mbox{SIM}(i,j) r_{ui} }{\sum_{i \in I_u} \mbox{SIM}(i,j)}
  
  Predictions for ``pearson`` similarity are made via
  
  .. math:: y_{uj}
          = \bar{r}_j + \frac{\sum_{i \in I_u} \mbox{SIM}(i,j) (r_{ui} - \bar{r}_i) }{\sum_{i \in I_u} \mbox{SIM}(i,j)}
  
  
  For more details of item similarity methods, please see, e.g.,
  Chapter 4 of [Ricci_et_al]_.
  
  See Also
  --------
  create
  
  References
  ----------
  .. [Ricci_et_al] Francesco Ricci, Lior Rokach, and Bracha Shapira.
      `Introduction to recommender systems handbook
      <http://www.inf.unibz.it/~ricci/papers
      /intro-rec-sys-handbook.pdf>`_. Springer US, 2011.
class_docstr_tok: ["A","model","that","ranks","an","item","according","to","its","similarity","to","other","items","observed","for","the","user","in","question",".","*","*","Creating","an","ItemSimilarityRecommender","*","*","This","model","can","not","be","constructed","directly",".","Instead",",","use",":","func",":","`","turicreate.recommender.item_similarity_recommender.create","`","to","create","an","instance","of","this","model",".","A","detailed","list","of","parameter","options","and","code","samples","are","available","in","the","documentation","for","the","create","function",".","Notes","--","--","-","*","*","Model","Definition","*","*","This","model","first","computes","the","similarity","between","items","using","the","observations","of","users","who","have","interacted","with","both","items",".","Given","a","similarity","between","item",":","math",":","`","i","`","and",":","math",":","`","j","`",",",":","math",":","`","S","(","i",",","j",")","`",",","it","scores","an","item",":","math",":","`","j","`","for","user",":","math",":","`","u","`","using","a","weighted","average","of","the","user","'s","previous","observations",":","math",":","`","I_u","`",".","There","are","three","choices","of","similarity","metrics","to","use",":","'jaccard","'",",","'cosine","'","and","'pearson","'",".","`","Jaccard","similarity","<","http",":","\/\/en.wikipedia.org\/wiki\/Jaccard_index",">","`","_","is","used","to","measure","the","similarity","between","two","set","of","elements",".","In","the","context","of","recommendation",",","the","Jaccard","similarity","between","two","items","is","computed","as","..","math",":",":","\\mbox","{","JS","}","(","i",",","j",")","=","\\frac","{","|U_i","\\cap","U_j|","}","{","|U_i","\\cup","U_j|","}","where",":","math",":","`","U_","{","i","}","`","is","the","set","of","users","who","rated","item",":","math",":","`","i","`",".","Jaccard","is","a","good","choice","when","one","only","has","implicit","feedbacks","of","items","(","e.g.",",","people","rated","them","or","not",")",",","or","when","one","does","not","care","about","how","many","stars","items","received",".","If","one","needs","to","compare","the","ratings","of","items",",","Cosine","and","Pearson","similarity","are","recommended",".","The","Cosine","similarity","between","two","items","is","computed","as","..","math",":",":","\\mbox","{","CS","}","(","i",",","j",")","=","\\frac","{","\\sum_","{","u\\in","U_","{","ij","}","}","r_","{","ui","}","r_","{","uj","}","}","{","\\sqrt","{","\\sum_","{","u\\in","U_","{","i","}","}","r_","{","ui","}","^2","}","\\sqrt","{","\\sum_","{","u\\in","U_","{","j","}","}","r_","{","uj","}","^2","}","}","where",":","math",":","`","U_","{","i","}","`","is","the","set","of","users","who","rated","item",":","math",":","`","i","`",",","and",":","math",":","`","U_","{","ij","}","`","is","the","set","of","users","who","rated","both","items",":","math",":","`","i","`","and",":","math",":","`","j","`",".","A","problem","with","Cosine","similarity","is","that","it","does","not","consider","the","differences","in","the","mean","and","variance","of","the","ratings","made","to","items",":","math",":","`","i","`","and",":","math",":","`","j","`",".","Another","popular","measure","that","compares","ratings","where","the","effects","of","means","and","variance","have","been","removed","is","Pearson","Correlation","similarity",":","..","math",":",":","\\mbox","{","PS","}","(","i",",","j",")","=","\\frac","{","\\sum_","{","u\\in","U_","{","ij","}","}","(","r_","{","ui","}","-","\\bar","{","r","}","_i",")","(","r_","{","uj","}","-","\\bar","{","r","}","_j",")","}","{","\\sqrt","{","\\sum_","{","u\\in","U_","{","ij","}","}","(","r_","{","ui","}","-","\\bar","{","r","}","_i",")","^2","}","\\sqrt","{","\\sum_","{","u\\in","U_","{","ij","}","}","(","r_","{","uj","}","-","\\bar","{","r","}","_j",")","^2","}","}","The","predictions","of","items","depend","on","whether","`","target","`","is","specified",".","When","the","`","target","`","is","absent",",","a","prediction","for","item",":","math",":","`","j","`","is","made","via","..","math",":",":","y_","{","uj","}","=","\\frac","{","\\sum_","{","i","\\in","I_u","}","\\mbox","{","SIM","}","(","i",",","j",")","}","{","|I_u|","}","Otherwise",",","predictions","for","``","jaccard","``","and","``","cosine","``","similarities","are","made","via","..","math",":",":","y_","{","uj","}","=","\\frac","{","\\sum_","{","i","\\in","I_u","}","\\mbox","{","SIM","}","(","i",",","j",")","r_","{","ui","}","}","{","\\sum_","{","i","\\in","I_u","}","\\mbox","{","SIM","}","(","i",",","j",")","}","Predictions","for","``","pearson","``","similarity","are","made","via","..","math",":",":","y_","{","uj","}","=","\\bar","{","r","}","_j","+","\\frac","{","\\sum_","{","i","\\in","I_u","}","\\mbox","{","SIM","}","(","i",",","j",")","(","r_","{","ui","}","-","\\bar","{","r","}","_i",")","}","{","\\sum_","{","i","\\in","I_u","}","\\mbox","{","SIM","}","(","i",",","j",")","}","For","more","details","of","item","similarity","methods",",","please","see",",","e.g.",",","Chapter","4","of","[","Ricci_et_al","]","_",".","See","Also","--","--","--","--","create","References","--","--","--","--","--","..","[","Ricci_et_al","]","Francesco","Ricci",",","Lior","Rokach",",","and","Bracha","Shapira",".","`","Introduction","to","recommender","systems","handbook","<","http",":","\/\/www.inf.unibz.it\/~ricci\/papers","\/intro-rec-sys-handbook.pdf",">","`","_",".","Springer","US",",","2011","."]
code: def _native_name(cls):
      return "item_similarity"
  
file_path: turicreate/src/python/turicreate/toolkits/recommender/item_similarity_recommender.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.toolkits.recommender.util import _Recommender
  from turicreate.toolkits._model import _get_default_options_wrapper
  from turicreate.data_structures.sframe import SFrame
label_desc: Use image node_id 2 for calling the ItemSimilarityRecommender obj's underlying member method code with example usage: obj._native_name(cls) and returns: str