-
-
Notifications
You must be signed in to change notification settings - Fork 427
Description
This concerns
igraph_community_to_membership()
igraph_le_community_to_membership()
The naming is not ideal. They don't convert "communities" to a membership vector, but a hierarchical clustering / dendrogram, by cutting it at a specified number of steps.
Originally I proposed renaming to merges_to_membership()
and splits_to_membership()
, but I no longer think this is a good naming as both really represent merges, it's just that the second one is more suitable for divisive algorithms. Let's give it some time, and discuss it in this issue. This is not a blocker for 1.0.
Summary of differences:
igraph_community_to_membership()
- Input: A "merges matrix" and a vertex count
n
- Merges matrix contains dendrogram node indices. The first
n
of these are the leaf nodes, identical the graph vertex IDs. - Suitable for representing the output of agglomerative algorithms or divisive algorithms that always divide down to singletons.
igraph_le_community_to_membership()
- Input: A "merges matrix" and an initial cluster assignment
membership
containingm
consecutively labelled clusters. - Merges matrix contains dendrogram node indices. The first
m
of these are the leaf nodes, identical the cluster IDs from the initial assignment. - Suitable also for divisive algorithms that do not divide down to singletons. Thus, more general than
igraph_community_to_membership()
.
Common to both
- Each row represents a merge of two dendrogram nodes into a node with a new index.
- Not necessary to merge everything into a single cluster, i.e. can have fewer rows than the initial number of clusters minus one. This is necessary for disconnected graphs.
- Both take a
steps
parameter, indicating after how many merges to cut the dendrogram.
It seems to me that igraph_le_community_to_membership()
is a more general version of igraph_community_to_membership()
and could be used instead of it, if using an initial cluster assignment where all vertices are in distinct clusters.
Proposal:
igraph_vertex_merges_to_membership()
(instead ofigraph_community_to_membership()
)igraph_cluster_merges_to_membership()
(instead ofigraph_le_community_to_membership()
)
Opinions @ntamas @schochastics @vtraag ?