Exercise 5.5.1 : Compute the hubbiness and authority of each of the nodes in our original Web graph of Fig. 5.1.
n = 4
sqrt(n)
a = c(1/2,1/2,1/2,1/2)
h = c(1/2,1/2,1/2,1/2)
A = matrix(c(0,1,1,1,
1,0,0,1,
1,0,0,0,
0,1,1,0), nrow = 4)
h = A%*%a
h = h/max(h)
a = t(A)%*%h
a = a/max(a)
pre_h =0
pre_a =0
while(pre_h != h || pre_a != a){
pre_h = h
h = A%*%a
h = h/max(h)
pre_a = a
a = t(A)%*%h
a = a/max(a)
}
a
h
! Exercise 5.5.2 : Suppose our graph is a chain of n nodes, as was suggested by Fig. 5.9. Compute the hubs and authorities vectors, as a function of n.
h = transpose(1,1,1,1,........1)
a = (1,1/2,1/2,1/2,1/2,1/2........,1/2)
'데이터마이닝' 카테고리의 다른 글
[데이터마이닝] 협업 필터링 collaborative filtering (멜론 플레이리스트 곡 예측) (0) | 2020.07.22 |
---|---|
[데이터마이닝] 9.추천 시스템(recommendation system) 9.2절 연습문제 (Exercise 9.2) (0) | 2020.05.19 |
[데이터마이닝] 5.링크분석(Link analysis) 5.4절 연습문제(Exercise 5.4 ) (0) | 2020.05.16 |
[데이터마이닝] 5.링크분석(Link analysis) 5.3절 연습문제(Exercise 5.3.5 ) (0) | 2020.05.12 |
[데이터마이닝] 5.링크분석(Link analysis) 5.2절 연습문제(Exercise 5.2.1 ) (0) | 2020.05.12 |