Eigenvector Centrality in CoffeeScript

A paper I read a while ago, The Duality of Persons and Groups, demonstrates a method for building a connection graph between people based solely on their membership in groups. With this graph in place we can calculate the centrality of a person or group (some relative importance metric).

A common method for calculating graph centrality is via an iterative Eigenvector calculation, which I use in the linked repo. https://github.com/aekeus/simple-network-analysis

(More links at the end of the article)

Group Membership (Input)

Group Membership (GM) is a 6x5 matrix of 0 or 1. Rows are members, columns are groups.  
Group
Member 1 2 3 4 5
A00001
B10000
C11000
D01111
E00100
F00110

Person To Person Connections

PP = GM * transpose(GM)  
Member
Member A B C D E F
A000100
B001000
C010100
D101012
E000101
F000210

Group to Group Connections

GG = transpose(GM) * GM  
Group
Group 1 2 3 4 5
101000
210111
301021
401201
501110

Centrality

Member Centrality  
A  0.214  XXXXXXXXX  
B  0.079  XXXX  
C  0.24   XXXXXXXXXX  
D  0.649  XXXXXXXXXXXXXXXXXXXXXXXXXX  
E  0.398  XXXXXXXXXXXXXXXX  
F  0.558  XXXXXXXXXXXXXXXXXXXXXXX

Group Centrality  
1  0.126  XXXXXX  
2  0.455  XXXXXXXXXXXXXXXXXXX  
3  0.545  XXXXXXXXXXXXXXXXXXXXXX  
4  0.545  XXXXXXXXXXXXXXXXXXXXXX  
5  0.427  XXXXXXXXXXXXXXXXXX  

Person to person centrality

Member Connections

Group to group centrality

Group Connections

References: