Ranking Functions
A linear ranking function applies the same vector w to instances through f(x) = w · x.
From Instances to Scores
Suppose a collection of instances must be ordered. A linear ranking function applies the same vector w to every instance x using f(x) = w · x. The result of each application is one scalar output. Those scalar outputs provide a compact representation that can be compared to form an ordering.
The Shared Ranking Rule
The vector w defines the projection rule used by the ranking function. It is shared across evaluations: the same w is applied to one instance, then to another, and so on. The instance x changes from evaluation to evaluation. This separation is central: w specifies the common rule, while x supplies the particular instance being evaluated.
A linear ranking function applies the same vector w to instances through f(x) = w · x.
Changing x changes the evaluated output. Changing w changes the projection rule used for the evaluation.
Tracing Two Evaluations
Two Instances Under One Rule
Trace what happens when the same vector w is applied to two instances, x₁ and x₂.
Choose the shared rule: Use one vector w for both evaluations. The ranking rule does not change between the two instances.
Evaluate the first instance: Apply f(x₁) = w · x₁. The projection produces one scalar output, written here as f(x₁).
Evaluate the second instance: Apply f(x₂) = w · x₂ using the same w. The instance has changed, so this is a separate evaluated output.
Compare the outputs: The two scalar results can be compared. Their collection provides a representation that can be used to form an ordering of the instances.
The shared vector w supplies the common projection rule, while x₁ and x₂ supply the changing inputs. Each input becomes one scalar output.
What do you think happens?
If the vector w stays fixed but the input changes from x₁ to x₂, what part of the ranking process changes?
Reveal answer
Answer: The evaluated output can change because the instance changes. The vector w remains the shared projection rule.
The ranking trace separates the fixed rule from the changing input: w is shared across evaluations, while x is the instance being evaluated.
Turning Scores into Order
The projection step and the ranking step should be kept conceptually separate. First, each instance is projected onto the same vector w and produces a scalar. Next, the collection of scalar outputs is compared to represent an ordering. The scalar is therefore the compact representation used for the ranking; it is the result assigned to an instance by the function.
A ranking function does not require a separate output format for every instance. Each instance is represented by the scalar produced by the same function, and those scalar representations can then be compared.
Mistakes in the Evaluation Trace
Treating w as if it changes for every instance.
The linear ranking function applies the same vector w to the instances.
Fix:
Keep w fixed while tracing multiple evaluations. Change x when moving from one instance to another.Confusing the instance with the scalar output.
x is the input instance, while f(x) = w · x produces the scalar output.
Fix:
Label the input as x and the result of the projection as f(x).Skipping the projection step and talking about an ordering immediately.
The ranking trace has two ideas: projection produces a scalar for each instance, and the collection of scalars can then represent an ordering.
Fix:
First record one scalar output per instance. Then compare the scalar outputs.Assuming that changing w only changes one result.
Changing w changes the projection rule itself.
Fix:
Treat a new w as a new projection rule and distinguish it from merely evaluating a new instance.
Practice the Ranking Trace
Write a short trace for three instances, x₁, x₂, and x₃. Use the same vector w for every evaluation. Identify the three scalar outputs symbolically, then explain how comparing those outputs can represent an ordering.
Hints
- Write f(x₁) = w · x₁, f(x₂) = w · x₂, and f(x₃) = w · x₃.
- State explicitly that w is shared across all three evaluations.
- Separate producing the scalar outputs from comparing them.
- A linear ranking function uses one shared vector w to evaluate each instance x through f(x) = w · x. Each projection produces a scalar. When the instances are evaluated, the resulting scalar outputs form a compact representation that can be compared to create an ordering.
Key Takeaways
- The vector w defines the shared projection rule.
- The instance x is the input that changes from one evaluation to the next.
- Applying f(x) = w · x produces one scalar for each instance.
- The collection of scalar outputs can be compared to represent an ordering.
- Changing x changes the evaluated output, while changing w changes the projection rule.