Help Center/ Graph Engine Service/ User Guide/ Algorithms/ Origin-Destination Betweenness Centrality
Updated on 2024-01-03 GMT+08:00

Origin-Destination Betweenness Centrality

Overview

The Origin-Destination Betweenness Centrality algorithm calculates shortest paths that pass through a vertex/edge, with the origin and destination (OD) specified.

Application Scenarios

OD Betweenness Centrality can be used for tracing man-in-the-middle in social networks and risk control networks and identifying key vertices in transportation networks. It is suitable for simulating busy transportation sections during peak hours. It is also widely used for social networking, financial risk control, transportation networking, and city planning.

Parameter Description

Table 1 Algorithm parameters

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.

-

OD_pairs

No

Pairs of OD vertices

String

The value must be in the standard CSV format. The start vertex (origin) and end vertex (destination) are separated by commas (,), and the start and end vertex pairs are separated by newline characters (\n), for example, Alice,Nana\nLily,Amy.

-

seeds

No

ID of the hot spot vertex

String

Data that will be imported when the data of OD vertex pairs is unknown. The value is in the standard CSV format. IDs are separated by commas (,), for example, Alice, Nana. A maximum of 30 IDs are allowed.

-

modes

No

Hot spot vertex type

String

  • IN: The hot spot vertex ID is used as the start vertex ID.
  • OUT: The hot spot vertex ID is used as the end vertex ID.

-

attendees

No

Number of participants at each hot spot in seeds

String

The value is in the standard CSV format. Numbers are separated by commas (,), for example, 10,20. The value ranges from 1 to 1,000,000.

-

When you perform approximate OD-Betweenness calculation, either OD_pairs or seeds must be specified. If both are specified, the OD_pairs vertices will be used for calculation by default and seeds will be ignored.

Precautions

None

Example

Ser weight=length, directed=true, OD = Alice,Nana\nLily,Amy and view the result.