class_docstr: A trainset contains all useful data that constitute a training set.
  
  It is used by the :meth:`fit()
  <surprise.prediction_algorithms.algo_base.AlgoBase.fit>` method of every
  prediction algorithm. You should not try to build such an object on your
  own but rather use the :meth:`Dataset.folds()
  <surprise.dataset.Dataset.folds>` method or the
  :meth:`DatasetAutoFolds.build_full_trainset()
  <surprise.dataset.DatasetAutoFolds.build_full_trainset>` method.
  
  Trainsets are different from :class:`Datasets <surprise.dataset.Dataset>`.
  You can think of a :class:`Dataset <surprise.dataset.Dataset>` as the raw
  data, and Trainsets as higher-level data where useful methods are defined.
  Also, a :class:`Dataset <surprise.dataset.Dataset>` may be comprised of
  multiple Trainsets (e.g. when doing cross validation).
  
  
  Attributes:
      ur(:obj:`defaultdict` of :obj:`list`): The users ratings. This is a
          dictionary containing lists of tuples of the form ``(item_inner_id,
          rating)``. The keys are user inner ids.
      ir(:obj:`defaultdict` of :obj:`list`): The items ratings. This is a
          dictionary containing lists of tuples of the form ``(user_inner_id,
          rating)``. The keys are item inner ids.
      n_users: Total number of users :math:`|U|`.
      n_items: Total number of items :math:`|I|`.
      n_ratings: Total number of ratings :math:`|R_{train}|`.
      rating_scale(tuple): The minimum and maximal rating of the rating
          scale.
      global_mean: The mean of all ratings :math:`\mu`.
class_docstr_tok: ["A","trainset","contains","all","useful","data","that","constitute","a","training","set",".","It","is","used","by","the",":","meth",":","`","fit","(",")","<","surprise.prediction_algorithms.algo_base.AlgoBase.fit",">","`","method","of","every","prediction","algorithm",".","You","should","not","try","to","build","such","an","object","on","your","own","but","rather","use","the",":","meth",":","`","Dataset.folds","(",")","<","surprise.dataset.Dataset.folds",">","`","method","or","the",":","meth",":","`","DatasetAutoFolds.build_full_trainset","(",")","<","surprise.dataset.DatasetAutoFolds.build_full_trainset",">","`","method",".","Trainsets","are","different","from",":","class",":","`","Datasets","<","surprise.dataset.Dataset",">","`",".","You","can","think","of","a",":","class",":","`","Dataset","<","surprise.dataset.Dataset",">","`","as","the","raw","data",",","and","Trainsets","as","higher-level","data","where","useful","methods","are","defined",".","Also",",","a",":","class",":","`","Dataset","<","surprise.dataset.Dataset",">","`","may","be","comprised","of","multiple","Trainsets","(","e.g",".","when","doing","cross","validation",")",".","Attributes",":","ur","(",":","obj",":","`","defaultdict","`","of",":","obj",":","`","list","`",")",":","The","users","ratings",".","This","is","a","dictionary","containing","lists","of","tuples","of","the","form","``","(","item_inner_id",",","rating",")","``",".","The","keys","are","user","inner","ids",".","ir","(",":","obj",":","`","defaultdict","`","of",":","obj",":","`","list","`",")",":","The","items","ratings",".","This","is","a","dictionary","containing","lists","of","tuples","of","the","form","``","(","user_inner_id",",","rating",")","``",".","The","keys","are","item","inner","ids",".","n_users",":","Total","number","of","users",":","math",":","`","|U|","`",".","n_items",":","Total","number","of","items",":","math",":","`","|I|","`",".","n_ratings",":","Total","number","of","ratings",":","math",":","`","|R_","{","train","}","|","`",".","rating_scale","(","tuple",")",":","The","minimum","and","maximal","rating","of","the","rating","scale",".","global_mean",":","The","mean","of","all","ratings",":","math",":","`","\\mu","`","."]
docstr: Convert an **item** inner id to a raw id.
  
  See :ref:`this note<raw_inner_note>`.
  
  Args:
      iiid(int): The item inner id.
  
  Returns:
      str: The item raw id.
  
  Raises:
      ValueError: When ``iiid`` is not an inner id.
docstr_tok: ["Convert","an","*","*","item","*","*","inner","id","to","a","raw","id",".","See",":","ref",":","`","this","note","<","raw_inner_note",">","`",".","Args",":","iiid","(","int",")",":","The","item","inner","id",".","Returns",":","str",":","The","item","raw","id",".","Raises",":","ValueError",":","When","``","iiid","``","is","not","an","inner","id","."]
code: def to_raw_iid(self, iiid):
      """Convert an **item** inner id to a raw id.
  
      See :ref:`this note<raw_inner_note>`.
  
      Args:
          iiid(int): The item inner id.
  
      Returns:
          str: The item raw id.
  
      Raises:
          ValueError: When ``iiid`` is not an inner id.
      """
  
      if self._inner2raw_id_items is None:
          self._inner2raw_id_items = {
              inner: raw
              for (raw, inner) in self._raw2inner_id_items.items()
          }
  
      try:
          return self._inner2raw_id_items[iiid]
      except KeyError:
          raise ValueError(str(iiid) + " is not a valid inner id.")
  
file_path: Surprise/surprise/trainset.py
imports: import numpy
label_desc: Use image node_id 7 for calling the Trainset obj's underlying member method code with example usage: obj.to_raw_iid(iiid) and returns: self