Lably
Skip to content

Rocchio algorithm

  • 3 min read
  • 4 chapters

Related on Lably

Through Information retrieval, Algorithm and Search engine

Algorithm

The formula and variable definitions for Rocchio relevance feedback are as follows:

Q→m=aQ→o+b1|Dr|∑D→j∈DrD→j−c1|Dnr|∑D→k∈DnrD→k

As demonstrated in the formula, the associated weights (a, b, c) are responsible for shaping the modified vector in a direction closer, or farther away, from the original query, related documents, and non-related documents. In particular, the values for b and c should be incremented or decremented proportionally to the set of documents classified by the user. If the user decides that the modified query should not contain terms from either the original query, related documents, or non-related documents, then the corresponding weight (a, b, c) value for the category should be set to 0.

In the later part of the algorithm, the variables Dr, and Dnr are presented to be sets of vectors containing the coordinates of related documents and non-related documents. In the formula, D→j and D→k are the vectors used to iterate through the two sets Dr and Dnr and form vector summations. These sums are normalized, i.e. divided by the size of their respective document set.

In order to visualize the changes taking place on the modified vector, please refer to the image below. As the weights are increased or decreased for a particular category of documents, the coordinates for the modified vector begin to move either closer, or farther away, from the centroid of the document collection. Thus if the weight is increased for related documents, then the modified vectors coordinates will reflect being closer to the centroid of related documents.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication