Skip to content
kent edited this page Nov 28, 2019 · 2 revisions

Introduction

HANP is a community detection algorithm that is based on label propagation. Unlike tradational LPA, HANP considers the weighted sum of neighbors' labels while selecting the current label of each node. A node's label as well as the summed weights (Hop attenuation is substracted.) are both considered for deciding its neighbors' label in the next iteration. (Paper:Towards real-time community detection in large networks - https://arxiv.org/pdf/0808.2633.pdf)

Parameters

use --help param to view detailed help information.

Input Format

Input files should be formatted as follows:

<src>,<dst>,<weight>

where <src> and <dst> are integers of type uint32_t, representing the end nodes of an edge. <weight> is an optional input, indicating the weight of an edge. Note that Plato treats every input graph as undirected by default. For a directed graph, please ensure both <A, B> and <B, A> appear in the input file if they exist. Edges that appear more than once will be considered as multiple edges between the same pair of nodes.

Input example (Following numbers are synthetic and are for demonstration purpose only.):

4564,823192,0.12
1996,973033,0.88

Output Format

Output files are formatted as follows:

<vertex_id>,<cluster_id>

where <vertex_id> represents a node and <cluster_id> gives the id of the cluster that contains the node. Note that cluster ids may not start from 1 or be consecutive as some clusters are eliminated.

Output example (Following numbers are synthetic and are for demonstration purpose only.):

66720,827192
99086,639730

Code

https://github.com/Tencent/plato/tree/master/plato/algo/hanp

Algorithms to open source:

  • Network Embedding
    • LINE
    • Word2Vec
    • GraphVite
  • GNN
    • GCN
    • GraphSage
Clone this wiki locally