当前位置:网站首页>[information retrieval] link analysis

[information retrieval] link analysis

2022-07-04 14:28:00 Alex_ SCY

(1). Reading materials 《Introduction to Information Retrieval》 The first 464-470 page 21.2 As described in section PageRank computing method ( adopt power iteration To achieve ), use Java Language or other commonly used languages to implement the algorithm . Take the structure shown in the following figure as an example to calculate each document Of PageRank value , among teleportation rate=0.05.

image-1656839878801

Preset some program parameters :
image-1656839944203
Create adjacency matrix according to the graph given in the title :
image-1656839947634
image-1656839959344
For this question , The adjacency matrix is shown below :
linkMatrix[i][j]=1 It indicates that there is a slave node i Point to the node j The directed side of .
image-1656839982105
Then start to calculate the transition probability matrix :
There are three steps :

  1. Use 1 Take out each 1
  2. The processed result matrix is multiplied by 1-α
  3. Add alpha/N
    image-1656839993752
    Finally, the transition probability matrix corresponding to the ontology can be obtained :
    image-1656840022911

Perform power iteration :
Initialize the probability distribution vector :
image-1656840032400
Then iterate according to the following formula , Until the probability distribution vector converges :
image-1656840043644
image-1656840048110
The final calculation results are as follows : It can converge after one iteration
image-1656840062073
namely Pagerank(d1)=0.017,Pagerank(d2)=0.492,Pagerank(d3)=0.492. A simple analysis shows that ,d2 And d3 It's symmetrical . At the same time, because there is no document Point to d1, Only when you encounter random jump, you will jump to document1, therefore Pagerank(d1) Will be significantly smaller than the other two values .

(2). In another way ( No power iteration The way ) Calculate with pen ( No program calculation ) topic (1) Each of them document Of PageRank value . Detailed description and calculation process are required .(10 branch )

It can be calculated according to algebraic algorithm :
PageRank The definition of :
image-1656840085890
therefore :
image-1656840092960
among M Is the transition probability matrix ( No random jump ),1 by [1*N] The holonomic matrix of ,I Is the unit matrix
image-1656840103999
And that gives us image-1656840123245,Pagerank(d1)=0.017,Pagerank(d2)=0.492,Pagerank(d3)=0.492, The results are obtained by the power iteration method .

(3). Reading materials 《Introduction to Information Retrieval》 The first 474-477 page 21.3 As described in section HITS computing method ( adopt power iteration To achieve ), use Java Language or other commonly used languages to implement the algorithm . Take the structure shown in the following figure as an example to calculate each document Of authority Values and hub value .

image-1656840171293

Preset some program parameters :
image-1656840184276
Then label the nodes in the graph , And generate the corresponding adjacency matrix , As shown below :
image-1656840200100
image-1656840208575

Adjacency matrix :
image-1656840217433

initialization hub as well as authority vector :
image-1656840226578
Start the iteration according to the following formula , At the same time, after each iteration, the vector needs to be normalized , until hub And authority Vector convergence :
image-1656840235149
image-1656840241443

The final running results are as follows :
image-1656840260324
image-1656840267937
Final hub The largest value is the node 8( be in base set) , node 8 Pointing to the node 7 and 9, meanwhile 7 and 9 It is pointed to by multiple nodes (authority High value ), So nodes 8 Of hub The highest value is very reasonable .
authority The largest value is the node 7 ( be in root set), node 7 By node 2,3,8 Point to , At the same time node 2,3,8 Of hub High value , So nodes 7 Of authority The highest value is very reasonable .
image-1656840283834

hub/authority Value can reflect the navigation and authority of a web page . Different website purposes should focus on different indicators , For example, navigation websites should focus on hub value , This can point more accurately ; Portal websites should focus on authority value , Let more navigation websites point to it , Improve Authority .

原网站

版权声明
本文为[Alex_ SCY]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041213181903.html