ArticleslgStudy

computer science

Rocchio algorithm

Rocchio algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Rocchio algorithm rather than just read about it. In short: The Rocchio algorithm is based on a method of relevance feedback found in information retrieval systems which stemmed from the SMART Information Retrieval System developed between 1960 and 1964. Like many other retrieval systems, the Rocchio algorithm was developed using the vector space model.

Rocchio algorithm — main illustration
Rocchio algorithm — illustration

Key takeaways

  • Rocchio algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Rocchio algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Rocchio algorithm from memory before moving on to harder problems.

Reference excerpt

The Rocchio algorithm is based on a method of relevance feedback found in information retrieval systems which stemmed from the SMART Information Retrieval System developed between 1960 and 1964. Like many other retrieval systems, the Rocchio algorithm was developed using the vector space model. Its underlying assumption is that most users have a general conception of which documents should be denoted as relevant or irrelevant. Therefore, the user's search query is revised to include an arbitrary percentage of relevant and irrelevant documents as a means of increasing the search engine's recall, and possibly the precision as well. The number of relevant and irrelevant documents allowed to enter a query is dictated by the so called weights, i.e. the variables a {\displaystyle a} , b {\displaystyle b} and c {\displaystyle c} listed below in the Algorithm section.

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

Q → m = a Q → o + b 1 | D r | ∑ D → j ∈ D r D → j − c 1 | D n r | ∑ D → k ∈ D n r D → k {\displaystyle {\vec {Q}}_{m}=a\,{\vec {Q}}_{o}+b\,{\frac {1}{|D_{r}|}}\sum _{{\vec {D}}_{j}\in D_{r}}{\vec {D}}_{j}-c\,{\frac {1}{|D_{nr}|}}\sum _{{\vec {D}}_{k}\in D_{nr}}{\vec {D}}_{k}}

As demonstrated in the formula, the associated weights ( a {\displaystyle a} , b {\displaystyle b} , c {\displaystyle 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 {\displaystyle b} and c {\displaystyle 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 {\displaystyle a} , b {\displaystyle b} , c {\displaystyle c} ) value for the category should be set to 0. In the later part of the algorithm, the variables D r {\displaystyle D_{r}} , and D n r {\displaystyle D_{nr}} are presented to be sets of vectors containing the coordinates of related documents and non-related documents. In the formula, D → j {\displaystyle {\vec {D}}_{j}} and D → k {\displaystyle {\vec {D}}_{k}} are the vectors used to iterate through the two sets D r {\displaystyle D_{r}} and D n r {\displaystyle D_{nr}} 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.

Time complexity

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Rocchio algorithm

Start with the simplest possible case. Write down what Rocchio algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Rocchio algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Rocchio algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Rocchio algorithm

In research
Rocchio algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Rocchio algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Rocchio algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Search algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Rocchio algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Rocchio algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Rocchio algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Rocchio algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Rocchio algorithm in simple terms?

The Rocchio algorithm is based on a method of relevance feedback found in information retrieval systems which stemmed from the SMART Information Retrieval System developed between 1960 and 1964. Like many other retrieval systems, the Rocchio algorithm was developed using the vector space model.

Why does Rocchio algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Rocchio algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Rocchio algorithm.

Tags

  • Search algorithms

Keep exploring