I have n
observations on which I have computed m
clusterings. The clusterings I generated are actually hierarchical divisive, even though they were computed independently. here is a subset of my data:
print(test)
m_0 m_13000 m_14608 m_16278
<dbl> <dbl> <dbl> <dbl>
1 1 10 101 1001
2 1 10 101 1002
3 1 11 102 1003
4 1 11 102 1004
5 1 12 103 1005
6 1 12 104 1006
7 2 13 105 1007
8 2 13 106 1008
9 2 13 106 1009
10 2 14 107 1010
.. ... ... ... ...
Each row i = 1:n
is an observation, and each column j = 1:m
is the membership of the observations based on clustering j
. The cluster IDs are unique across the different clustering solutions, i.e. min(test[, j]) > max(test[, j-1])
.
The observations are represented as vertices on an igraph
graph. I want to turn the test
data above into a merge matrix to pass to igraph::make_clusters
for further manipulation. What is the best way to do this? I looked at the merge matrix created by this example but I don't really understand it. Can anyone help me out?