• Non ci sono risultati.

Machine-learned scoring

Nel documento to Information Retrieval (pagine 165-168)

7 Computing scores in a completesearch system

7.2 Components of a basic information retrieval system

7.2.4 Machine-learned scoring

In this section we generalize the methodology of Section 6.1.2 to machine learn the scoring function. In Section 6.1.2 we considered a case where we had to combine Boolean indicators of relevance; here we consider more general factors to further develop the notion of machine-learned relevance. In par-ticular, the factors we now consider go beyond Boolean functions of query term presence in document zones, as in Section 6.1.2.

We develop the ideas using a setting in which we have a scoring function that is a linear combination of two factors: (1) the vector space cosine sim-ilarity between query and document and (2) the minimum window width ω within which the query terms lie. Thus we have a factor that depends on the statistics of query terms in the document as a bag of words, and another that depends on proximity weighting. We focus on this two-factor devel-opment of the ideas because it retains the generality of many more factors, while remaining simple enough to visualize.

As in Section 6.1.2 we are provided with a set of training examples, each of which is a pair consisting of a query and a document, together with a relevance judgment for that document on that query that is either Relevant or Non-relevant. For each such example we can compute the vector space cosine similarity, as well as the window width ω. The result is a training set as shown in Figure 7.3, which resembles Figure 6.5 from Section 6.1.2.

Example DocID Query Cosine score ω Judgment

Φ1 37 linux operating system 0.032 3 Relevant

Φ2 37 penguin logo 0.02 4 Non-relevant

Φ3 238 operating system 0.043 2 Relevant

Φ4 238 runtime environment 0.004 2 Non-relevant

Φ5 1741 kernel layer 0.022 3 Relevant

Φ6 2094 device driver 0.03 2 Relevant

Φ7 3191 device driver 0.027 5 Non-relevant

· · · ·

Figure 7.3 Training examples for machine-learned scoring.

The two numerical factors (cosine score denoted α and window width ω) are called features in the setting of machine learning, which we will explore further beginning Chapter 13. If we were once again to quantify the judg-ment Relevant as a 1 and Non-relevant as 0, we seek a scoring funtion that combines the values of the features to generate a value that is 0 or 1. We wish this function to be in agreement with our set of training examples as far as possible. Without loss of generality, our linear combination of features has the form

Score(α, ω) =++c, (7.3)

with the coefficients a, b, c to be learned from the training data. While it is now possible to formulate this as an error minimization problem as we did in Section 6.1.2, it is instructive to visualize the geometry of Equation (7.3).

First, note that the examples in Figure 7.3 can be plotted on a two-dimensional plane with axes corresponding to the cosine score α and the window width ω. This is depicted in Figure 7.4.

In this setting, the function Score(α, ω) from Equation (7.3) represents a plane “hanging above” Figure 7.4. Ideally this plane (in the direction per-pendicular to the page containing Figure 7.4) assumes values close to 1 above the points marked R, and values close to 0 above the points marked N. Since a plane is unlikely to assume only values close to 0 or 1 above the train-ing sample points, we make use of thresholdtrain-ing: given any query and doc-ument for which we wish to determine relevance, we pick a value θ and if Score(α, ω) > θ we declare the document to be Relevant, else we de-clare the document to be Non-relevant. This is equivalent to the following:

consider the line passing through the plane Score(α, ω) whose height is θ above the page containing Figure 7.4. Project this line down onto Figure 7.4;

this might look like the dashed line in Figure 7.4. Then, any subsequent query/document pair that falls below the dashed line in Figure 7.4 is deemed Non-relevant; above the dashed line, Relevant.

Figure 7.4 A collection of training examples. Each R denotes a training example labeled Relevant, while each N is a training example labeled Non-relevant.

Thus, the problem of making a binary Relevant/Non-relevant judgment given training examples as above turns into one of learning the dashed line in Figure 7.4 separating Relevant training examples from the Non-relevant ones. Being in the α-ω plane, this line can be written as a linear equation involving α and ω, with two parameters (slope and intercept). The problem of finding such a line has a rich mathematical basis and is studied in a very general form in Chapter 15. Indeed, it has a ready generalization to func-tions on more than two variables – thus allowing us to not only consider (as here) α and ω, but simultaneously a host of other scoring features such as static quality, zone contributions, document length and so on. Provided we can build a sufficiently rich collection of training samples, we can thus

alto-◮Figure 7.5 A complete search system. Data paths are shown primarily for a free-text query.

gether avoid hand-tuning score functions as in Section 7.2.3. The bottleneck of course is the ability to maintain a suitably representative set of training examples, whose relevance assessments must be made by experts.

Exercise 7.10

Plot the first 7 rows of Figure 7.3 in the α-ω plane to produce a figure like that in Figure 7.4.

Exercise 7.11

Write down the equation of a line in the α-ω plane separating the R’s from the N’s.

Exercise 7.12

Give a training example (consisting of values for α, ω and the relevance judgment) that when added to the training set makes it impossible to separate the R’s from the N’s using a line in the α-ω plane.

Nel documento to Information Retrieval (pagine 165-168)