This class wraps a set of results for a given query.
More...
#include <queryresults.h>
This class wraps a set of results for a given query.
The internal data representation is the same as the Dataset it comes from.
- Todo:
- TODO: it seems we need also a class withouth features
Allocates an Query Results Object.
This is used to store a the set of instances and their labels related to a specific query.
- Parameters
-
n_instances | The number of training instances (lines) in the dataset. |
n_features | The number of features. |
quickrank::data::QueryResults::~QueryResults |
( |
| ) |
|
|
virtual |
Feature* quickrank::data::QueryResults::features |
( |
| ) |
const |
|
inline |
void quickrank::data::QueryResults::indexing_of_sorted_labels |
( |
const Score * |
scores, |
|
|
size_t * |
dest |
|
) |
| const |
Sorts the element of the current result list in descending order of the given scores vector and stores in dest the positions of the sorted labels.
- Parameters
-
scores | vector of scores used for reverse sorting. |
dest | output of the sorting indexing. |
Label* quickrank::data::QueryResults::labels |
( |
| ) |
const |
|
inline |
size_t quickrank::data::QueryResults::num_results |
( |
| ) |
const |
|
inline |
void quickrank::data::QueryResults::sorted_labels |
( |
const Score * |
scores, |
|
|
Label * |
dest, |
|
|
const size_t |
cutoff |
|
) |
| const |
Sorts the element of the current result list in descending order of the given scores vector and stores the resulting sorted labels in dest.
- Parameters
-
scores | vector of scores used for reverse sorting. |
dest | output of the labels sorting. |
cutoff | number of labels of interest, i.e., length of dest. |
Feature* quickrank::data::QueryResults::features_ |
|
private |
Label* quickrank::data::QueryResults::labels_ |
|
private |
size_t quickrank::data::QueryResults::num_results_ |
|
private |
The documentation for this class was generated from the following files: