Table Of Contents

Graph loopy_belief_propagation


loopy_belief_propagation(self, prior_property, posterior_property, state_space_size, edge_weight_property='', convergence_threshold=0.0, max_iterations=20, was_labeled_property_name=None, alpha=None)

Classification on sparse data using Belief Propagation.

Parameters:

prior_property : unicode

Name of the vertex property which contains the prior belief for the vertex.

posterior_property : unicode

Name of the vertex property which will contain the posterior belief for each vertex.

state_space_size : int32

Number of features

edge_weight_property : unicode (default=)

Name of the edge property that contains the edge weight for each edge.

convergence_threshold : float64 (default=0.0)

Belief propagation will terminate when the average change in posterior beliefs between supersteps is less than or equal to this threshold.

max_iterations : int32 (default=20)

The maximum number of supersteps that the algorithm will execute.The valid range is all positive int.

was_labeled_property_name : unicode (default=None)

(LP only) - Represents the column/property name for the was labeled field

alpha : float32 (default=None)

(LP only) - Represents the tradeoff parameter that controls how much influence an external classifier’s prediction contributes to the final prediction. This is for the case where an external classifier is available that can produce initial probabilistic classification on unlabeled examples, and the option allows incorporating external classifier’s prediction into the LP training process.The valid value range is [0.0,1.0].Default is 0.1

Returns:

: dict

Progress report for belief propagation in the format of a multiple-line string.

Belief propagation by the sum-product algorithm. This algorithm analyzes a graphical model with prior beliefs using sum product message passing. The priors are read from a property in the graph, the posteriors are written to another property in the graph. This is the GraphX-based implementation of belief propagation.

See Loopy Belief Propagation for a more in-depth discussion of BP and LBP.