liveBook · Manning

Pairwise transform

As explained in AI-Powered Search

A pairwise transform algorithm converts preferences between relevant and irrelevant examples into transformed training instances for classification.

A pairwise transform converts learning-to-rank judgments into binary-classification instances. For each query, it compares documents with different relevance grades, subtracts their feature vectors, and labels the difference +1 or -1 according to which document is more relevant. section 10.4.2

The transformation proceeds as follows:

  • Group judgments by query and compare every pair with different grades. section 10.4.2

Search-ranking example

For “social network,” subtracting Network’s [3.101, 1.443] from The Social Network’s [4.483, 2.100] produces a positive training example; reversing the pair produces the corresponding negative example.

How AI-Powered Search covers it

How deep it goes
Explains query-pair enumeration, feature subtraction, and polarity labels, stopping at binary-classification training data.
Examples
Uses BM25 feature vectors for Network, The Social Network, Social Genocide, and Star Wars query documents.
What it assumes
Assumes normalized feature vectors, query-level judgments, relevance grades, and comparable document features.
What you can do after
Apply via SVMrank by generating labeled feature-delta and predictor-delta arrays for model training.
How it connects
Connects learning to rank with binary classification, SVMrank, feature normalization, and graded relevance judgments.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.