class_docstr: A LabelPropagationModel computes the probability of each class label
  for each unlabeled vertex.
  
  For each labeled vertices, the probability for class k is fixed to:
  
      .. math::
        Pr_i(label=k) = I(label[i] == k)
  
  where :math:`I()` is the indicator function.
  
  For all unlabeled vertices, the probability for each class k is computed
  from applying the following update iteratively:
  
      .. math::
        Pr_i(label=k) = Pr_i(label=k) * W_0 + \sum_{j\in N(i)} Pr_j(label=k) * W(j,i)
  
        Pr_i = Normalize(Pr_i)
  
  where :math:`N(i)` is the set containing all vertices :math:`j` such that
  there is an edge going from :math:`j` to :math:`i`. :math:`W(j,i)` is
  the edge weight from :math:`j` to :math:`i`, and :math:`W_0` is the
  weight for self edge.
  
  In the above equation, the first term is the probability
  of keeping the label from the previous iteration, and the second term
  is the probability of transition to a neighbor's label.
  
  Repeated edges (i.e., multiple edges where the source vertices are the same and the
  destination vertices are the same) are treated like normal edges in the
  above recursion.
  
  By default, the label propagates from source to target. But if `undirected`
  is set to true in :func:`turicreate.label_propagation.create`, then the label
  propagates in both directions for each edge.
  
  Below is a list of queryable fields for this model:
  
  +-------------------+-----------------------------------------------------------+
  | Field             | Description                                               |
  +===================+===========================================================+
  | labels            | An SFrame with label probability for each vertex          |
  +-------------------+-----------------------------------------------------------+
  | graph             | A new SGraph with label probability as vertex properties  |
  +-------------------+-----------------------------------------------------------+
  | delta             | Average changes in label probability during the last      |
  |                   | iteration (avg. of the L2 norm of the changes)            |
  +-------------------+-----------------------------------------------------------+
  | num_iterations    | Number of iterations                                      |
  +-------------------+-----------------------------------------------------------+
  | training_time     | Total training time of the model                          |
  +-------------------+-----------------------------------------------------------+
  | threshold         | The convergence threshold in average L2 norm              |
  +-------------------+-----------------------------------------------------------+
  | self_weight       | The weight for self edge                                  |
  +-------------------+-----------------------------------------------------------+
  | weight_field      | The edge weight field id                                  |
  +-------------------+-----------------------------------------------------------+
  | label_field       | The vertex label field id                                 |
  +-------------------+-----------------------------------------------------------+
  | undirected        | Treat edge as undirected                                  |
  +-------------------+-----------------------------------------------------------+
  
  This model cannot be constructed directly.  Instead, use
  :func:`turicreate.label_propagation.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.
  
  See Also
  --------
  create
class_docstr_tok: ["A","LabelPropagationModel","computes","the","probability","of","each","class","label","for","each","unlabeled","vertex",".","For","each","labeled","vertices",",","the","probability","for","class","k","is","fixed","to",":","..","math",":",":","Pr_i","(","label=k",")","=","I","(","label","[","i","]","==","k",")","where",":","math",":","`","I","(",")","`","is","the","indicator","function",".","For","all","unlabeled","vertices",",","the","probability","for","each","class","k","is","computed","from","applying","the","following","update","iteratively",":","..","math",":",":","Pr_i","(","label=k",")","=","Pr_i","(","label=k",")","*","W_0","+","\\sum_","{","j\\in","N","(","i",")","}","Pr_j","(","label=k",")","*","W","(","j",",","i",")","Pr_i","=","Normalize","(","Pr_i",")","where",":","math",":","`","N","(","i",")","`","is","the","set","containing","all","vertices",":","math",":","`","j","`","such","that","there","is","an","edge","going","from",":","math",":","`","j","`","to",":","math",":","`","i","`",".",":","math",":","`","W","(","j",",","i",")","`","is","the","edge","weight","from",":","math",":","`","j","`","to",":","math",":","`","i","`",",","and",":","math",":","`","W_0","`","is","the","weight","for","self","edge",".","In","the","above","equation",",","the","first","term","is","the","probability","of","keeping","the","label","from","the","previous","iteration",",","and","the","second","term","is","the","probability","of","transition","to","a","neighbor","'s","label",".","Repeated","edges","(","i.e.",",","multiple","edges","where","the","source","vertices","are","the","same","and","the","destination","vertices","are","the","same",")","are","treated","like","normal","edges","in","the","above","recursion",".","By","default",",","the","label","propagates","from","source","to","target",".","But","if","`","undirected","`","is","set","to","true","in",":","func",":","`","turicreate.label_propagation.create","`",",","then","the","label","propagates","in","both","directions","for","each","edge",".","Below","is","a","list","of","queryable","fields","for","this","model",":","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","Field","|","Description","|","+===================+===========================================================+","|","labels","|","An","SFrame","with","label","probability","for","each","vertex","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","graph","|","A","new","SGraph","with","label","probability","as","vertex","properties","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","delta","|","Average","changes","in","label","probability","during","the","last","|","|","|","iteration","(","avg",".","of","the","L2","norm","of","the","changes",")","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","num_iterations","|","Number","of","iterations","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","training_time","|","Total","training","time","of","the","model","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","threshold","|","The","convergence","threshold","in","average","L2","norm","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","self_weight","|","The","weight","for","self","edge","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","weight_field","|","The","edge","weight","field","id","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","label_field","|","The","vertex","label","field","id","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","undirected","|","Treat","edge","as","undirected","|","+","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","This","model","can","not","be","constructed","directly",".","Instead",",","use",":","func",":","`","turicreate.label_propagation.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",".","See","Also","--","--","--","--","create"]
code: def _load_version(cls, state, version):
      assert version == 0
      return cls(state["model"])
  
file_path: turicreate/src/python/turicreate/toolkits/graph_analytics/label_propagation.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.data_structures.sgraph import SGraph
  from turicreate.toolkits.graph_analytics._model_base import GraphAnalyticsModel
  from turicreate.util import _raise_error_if_not_of_type
label_desc: Use image node_id 8 for calling the LabelPropagationModel obj's underlying member method code with example usage: obj._load_version(cls, state, version) and returns: cls