Updated on 2023-08-04 GMT+08:00

Betweenness Centrality (2.2.4)

Table 1 parameters parameter description

Parameter

Mandatory

Description

Type

Value Range

Default Value

directed

No

Whether an edge is directed

Boolean

The value can be true or false

true

weight

No

Weight of an edge

String

The value can be an empty string. If this parameter is left blank, the weight and distance of this edge are 1 by default. You can set this parameter to a property of the edge, and the property value will be the weight. If the edge does not have the specified property, the weight is 1 by default.

NOTE:

The weight of an edge must be greater than 0.

-

seeds

No

Vertex ID

String

If the graph is large, precise betweenness calculation can be slow. You can set seeds to the sampling vertices for approximate calculation. The more seeds vertices, the closer results to the precise calculation. The number of vertices cannot be greater than 100,000.

-

k

No

Number of samples

Integer

If the graph is large, precise betweenness calculation can be slow. You can set k to randomly select k sampling vertices from the graph. The larger the value, the closer results to the precise calculation. The value cannot be greater than 100,000.

-

Table 2 response_data parameter description

Parameter

Type

Description

betweenness

List

Betweenness value of each node. The format is [{vertexId: betweennessValue}, ...].

  • vertexId is of the string type.
  • betweennessValue is of the double type.