Updated on 2022-09-15 GMT+08:00

Label Propagation

Overview

The Label Propagation algorithm is a graph-based semi-supervised learning method. Its basic principle is to predict the label information about unlabeled nodes using that of the labeled nodes. This algorithm can create graphs based on the relationships between samples. Nodes include labeled data and unlabeled data, and the edge indicates the similarity between two nodes. Node labels are transferred to other nodes based on the similarity. Labeled data is like a source used to label unlabeled data. The greater the node similarity is, the easier the label propagation will be.

Application Scenarios

This algorithm applies to scenarios such as information propagation, advertisement recommendation, and community discovery.

Parameter Description

Table 1 Label Propagation algorithm parameters

Parameter

Mandatory

Description

Type

Value Range

Default Value

convergence

No

Convergence

Double

A real number between 0 and 1 (excluding 0 and 1)

0.00001

max_iterations

No

Maximum iterations

Int

1-2,000

1,000

initial

No

Name of the property used as the initialization label on a vertex

String

Null or character string

  • Null: Each vertex is allocated with a unique initialization label. This method is applicable to scenarios where no vertex label information exists.
  • Character string: The value of the property field corresponding to each vertex is used as the initialization label (the type is string, and the initialization label field is set to null for a vertex with unknown labels). This method is applicable to scenarios where some vertex labels are marked to predict unknown vertex labels.
NOTE:

If the value of initial is not null, the number of vertices with initialization labels must be greater than 0 and less than the total number of vertices.

-

Precautions

Label Propagation uses IDs as labels by default.

Example

Set parameters coverage to 0.00001 and max_iterations to 1,000, the sub-graphs with different labels are displayed on the canvas. The color of a node varies with labels. The JSON result is displayed in the query result area.