Betweenness Centrality
Overview
Betweenness centrality is a measure of centrality in a graph based on shortest paths. This algorithm calculates shortest paths that pass through a vertex.
Application Scenarios
The Betweenness Centrality algorithm can be used for tracing man-in-the-middle in social networks and risk control networks and identifying key vertices in transportation networks. This algorithm is widely used for social networking, financial risk control, transportation networking, and city planning.
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, betweenness calculation can be slow. You can set seeds to the sampling nodes for approximate calculation. The more seeds nodes, the closer results to the accurate calculation. The number of vertices cannot be greater than 100,000. |
- |
k |
No |
Number of samples |
Integer |
If the graph is large, betweenness calculation can be slow. You can set k to randomly select k sampling vertices from the graph. The larger value, the closer results to the accurate calculation. The value cannot be greater than 100,000. |
- |
When you perform approximate betweenness calculation, either seeds or k must be specified. If both are specified, seeds vertices will be sampled by default and k will be ignored.
Precautions
None
Example
Set weight="length", directed=true, seeds ="Lee,Alice" and view the result.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.