Skip to content

Transformations

Michał Siedlaczek edited this page Jan 27, 2017 · 1 revision

The following diagram shows available transformations.

Diagram

The rest of this page describes them in more detail.

Shard Bucketization

Given lists of results for each of S individual shards, bucketize every shard into B buckets based on uniform distribution of document IDs within the shard.

Usage

selectivesearch bucketize [-c|--cost true|false] <basename>

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <features-path>#<s>.results.local
  • <features-path>#<s>.results.global
  • <features-path>#<s>.results.scores

where <s> is an integer between 0 and size(<features-path>.sizes).

Output

  • <basename>#<s>#<b>.results.local
  • <basename>#<s>#<b>.results.global
  • <basename>#<s>#<b>.results.scores

where <s> is an integer between 0 and size(<features-path>.sizes), and <b> is an integer between 0 and <bucket-count>.

Resolving Payoffs

Resolves payoffs based on global results and results within shards.

Usage

selectivesearch resolve-payoffs <basename>

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <basename>#<s>#<b>.results.global
  • <basename>.results.global

Ouptut

  • <basename>#<s>#<b>.payoff

Learning Payoffs

Please note that this should be executed on training data

Learns a model to predict buckets' payoffs based on extracted features.

Usage

selectivesearch learn-payoffs <basename of training data>

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <features-path>#<s>#<b>.payoff
  • <features-path>#<s>.redde
  • <features-path>#<s>.shrkc
  • <features-path>.qlen

Output

  • <basename>.model
  • <basename>.model.eval

Predicting Payoffs

Given a prediction model and input features, save predictions for payoffs.

Usage

selectivesearch predict-payoffs --model <prediction model> <basename of evaluation data>

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <features-path>#<s>.redde
  • <features-path>#<s>.shrkc
  • <features-path>.qlen

Output

  • <basename>#<s>#<b>.payoff

Shard Selection

Decide how many buckets to search through in each shard, based on buckets' costs and payoffs.

Usage

selectivesearch select-shards --budget <budget> <basename>

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <basename>#<s>#<b>.payoff
  • <basename>#<s>#<b>.cost

Ouptut

  • <basename>$[<budget>].selection
  • <basename>$[<budget>].selected.results
  • <basename>$[<budget>].selected.scores

Export to TREC

Export selected documents to TREC format.

Usage

selectivesearch export-trec <basename>$[<budget>]

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <basename>$[<budget>].selected.results
  • <basename>$[<budget>].selected.scores
  • <features-path>.titles
  • <features-path>.trecid

Ouptut

  • <basename>$[<budget>].selected.trec

Compute Overlap

Compute overlaps @k in {5,10,20,50,100}, both for each query (file *.overlaps) and the average (file *.overlap).

Usage

selectivesearch export-trec <basename>$[<budget>]

Input

  • <basename>.properties with the following properties defined:
    • features = <features-path>
    • buckets.count = <bucket-count>
    • k = <number-of-top-results-to-process>
  • <features-path>.sizes (shard sizes)
  • <basename>$[<budget>].selected.results
  • <basename>$[<budget>].selected.scores
  • <features-path>.titles
  • <features-path>.trecid

Ouptut

  • <basename>$[<budget>].overlaps@<k>
  • <basename>$[<budget>].overlap@<k>