Updated on 2025-08-22 GMT+08:00

Label Propagation (2.1.8)

Table 1 parameters parameter descriptions

Parameter

Mandatory

Type

Value Range

Description

Default Value

convergence

No

Double

The value is a real number between 0 and 1.

Convergence.

0.00001

max_iterations

No

Integer

Maximum iterations. An integer ranging from 1 to 2147483647. For frontend calls, the range is [1, 2000]. The default value is 1000.

Maximum iterations.

1000

initial

No

String

Empty or character string

  • Empty: 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 left blank 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 a character string, the number of vertices with initialization labels must be greater than 0 and less than the total number of vertices.

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

-

weight

No

String

Null or string

  • Null: The default weight and distance of edges are 1.
  • String: The property of the corresponding edge is the weight. If the edge does not have a property, the weight is 1 by default.
NOTE:

The weight of an edge must be greater than 0.

Weight of an edge.

Null

For how to adjust the values of max_iterations and convergence, see Iterations and Convergence of PageRank.

Table 2 response_data parameter descriptions

Parameter

Type

Description

community

List

Community corresponding to each vertex. The format is as follows:

[{vertexId:communityId},...]

where

vertexId is of the string type.

communityId is of the string type.