network_groups
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| network_groups [2015/12/01 00:19] – hkimscil | network_groups [2015/12/02 06:01] (current) – hkimscil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Identifying groups of networks ====== | ====== Identifying groups of networks ====== | ||
| + | '' | ||
| + | |||
| < | < | ||
| library(sna) | library(sna) | ||
| Line 10: | Line 12: | ||
| gplot(fmh, vertex.cex=0.5, | gplot(fmh, vertex.cex=0.5, | ||
| </ | </ | ||
| - | {{fmh.png}} | + | {{fmh.png?400}} |
| < | < | ||
| Line 501: | Line 503: | ||
| </ | </ | ||
| - | str(fmh.clique$cliques) | + | 위의 '' |
| - | fmh.clique라는 데이터를 | + | fmh.clique 라는 데이터를 |
| clique.census(fmh, | clique.census(fmh, | ||
| 거기서 발견되는 클리크(cliques)들을 나열해 본것. | 거기서 발견되는 클리크(cliques)들을 나열해 본것. | ||
| Line 513: | Line 515: | ||
| 그 멤버들은 122, 183, 530, 1143, 1160 이다. | 그 멤버들은 122, 183, 530, 1143, 1160 이다. | ||
| - | |||
| Clique 정의에 따라서 이들은 maximal complete link (모두 연결되어 있는) 관계의 집단이다. | Clique 정의에 따라서 이들은 maximal complete link (모두 연결되어 있는) 관계의 집단이다. | ||
| - | < | + | {{fmh.clique.5members.png?300}} |
| - | | + | |
| - | .. ..$ : int [1:4] 535 646 765 947 | + | |
| - | .. ..$ : int [1:4] 535 646 724 765 | + | < |
| - | .. ..$ : int [1:4] 290 836 1187 1335 | + | edge.list = matrix ( c(1,2, 1,3, 2,4, 2,5, 3,4, 3,5, 4,5, 5,4), byrow=T, ncol=2) |
| - | .. ..$ : int [1:4] 251 688 1087 1419 | + | s[edge.list]=1 |
| - | .. ..$ : int [1:4] 487 729 749 991 | + | s |
| - | .. ..$ : int [1:4] 487 492 729 991 | + | rownames(s)< |
| - | .. ..$ : int [1:4] 122 1143 1160 1415 | + | colnames(s)< |
| - | .. ..$ : int [1:4] 285 425 590 817 | + | > s |
| - | .. ..$ : int [1:4] 121 296 677 794 | + | |
| - | .. ..$ : int [1:4] 121 291 296 677 | + | |
| - | .. ..$ : int [1:4] 114 890 1061 1261 | + | |
| - | .. ..$ : int [1:4] 114 150 1061 1261 | + | |
| - | | + | |
| - | .. ..$ : int [1:4] 83 425 590 817 | + | |
| - | ..$ :List of 1 | + | |
| - | .. ..$ : int [1:5] 122 183 530 1143 1160 | + | |
| </ | </ | ||
| + | < | ||
| + | > edge.list = matrix ( c(1, | ||
| + | > s[edge.list] = 1 | ||
| + | > s | ||
| + | [,1] [,2] [,3] [,4] [,5] | ||
| + | [1,] 0 1 1 0 0 | ||
| + | [2,] 0 0 0 1 1 | ||
| + | [3,] 0 0 0 1 1 | ||
| + | [4,] 0 0 0 0 1 | ||
| + | [5,] 0 0 0 1 0 | ||
| + | </ | ||
| + | |||
| + | {{network_s.png? | ||
| + | |||
| + | 눈으로 봐서 a를 중심으로 좌우동형이므로 b, c와 d,e는 각각 등치 (등가)라고 할 수 있다. 이를 수식으로 구하기 위한 접근 방법으로는 연결을 1, 비연결을 0으로 한 각 노드(점) 간의 거리를 구하여 거리가 가까운 것들을 모아 놓으면 될 것이다. 가장 흔한 예가 Hamming distance: | ||
| + | * see [[yt> | ||
| + | |||
| + | 예: | ||
| + | |||
| + | |||
| + | < | ||
| + | set.seed(123) | ||
| + | p1< | ||
| + | p2< | ||
| + | G1< | ||
| + | G2< | ||
| + | G<-G1*G2 | ||
| + | G | ||
| + | |||
| + | hamming.G=sedist(G, | ||
| + | cluster <- equiv.clust(G, | ||
| + | |||
| + | |||
| + | b.mdoel <- blockmodel(G, | ||
| + | b.model | ||
| + | plot(b.model) | ||
| + | </ | ||
| + | |||
| + | {{cluster.dendrogram.png? | ||
| + | |||
| + | < | ||
| + | > b.model | ||
| + | |||
| + | Network Blockmodel: | ||
| + | |||
| + | Block membership: | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | Reduced form blockmodel: | ||
| + | |||
| + | |||
| + | Block 1 Block 2 Block 3 Block 4 Block 5 | ||
| + | Block 1 | ||
| + | Block 2 | ||
| + | Block 3 | ||
| + | Block 4 | ||
| + | Block 5 | ||
| + | > plot(b.model) | ||
| + | </ | ||
| + | {{blockmodel.png? | ||
| + | |||
network_groups.1448929151.txt.gz · Last modified: by hkimscil
