0
$\begingroup$

I have a matrix of interactions (1), avoidance (-1) and no interaction (0). I would like to cluster the matrix. I used hierarchical clustering but I was not very satisfied with the results. Any alternatives? Is is possible to use Louvain community detection with different interactions types?

Example matrix:

Im1 -1 1 0 1
Im2 -1 1 1 1
Im3 0 -1 1 1
Im4 0 -1 1 0

The results should highlight Im1/Im2 and Im3/Im4 as two independent branches

$\endgroup$
  • $\begingroup$ Shouldn't this matrix be symmetric? $\endgroup$ – Anony-Mousse Apr 2 '17 at 20:14
  • $\begingroup$ I am comparing the interactions column wise, so no $\endgroup$ – C.Colden Apr 3 '17 at 21:09
  • $\begingroup$ Ah, I see. You need to better label. Hierarchical clustering works fine here. The top two rows have distance 1, the bottom two also, but.e.g. 2 to 3 have distance sqrt(5) which is much larger. So unless you call the function incorrectly, it should work. $\endgroup$ – Anony-Mousse Apr 4 '17 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.