QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
Public Member Functions | Private Attributes | List of all members
quickrank::data::RankedResults Class Reference

This class generates a ranked list of results. More...

#include <rankedresults.h>

Public Member Functions

 RankedResults (std::shared_ptr< QueryResults > results, Score *scores)
 Generates a Ranked Results list. More...
 
virtual ~RankedResults ()
 
Labelsorted_labels () const
 
Scoresorted_scores () const
 
const size_t pos_of_rank (const size_t rank) const
 
const size_t num_results () const
 

Private Attributes

Labellabels_ = NULL
 
Scorescores_ = NULL
 
size_t num_results_
 
size_t * unmap_ = NULL
 

Detailed Description

This class generates a ranked list of results.

This class does not carry information about the actual features, but only about the labels and the scores generated by a ranker (this is why this is not (yet) a subclass of QueryResults).

Constructor & Destructor Documentation

quickrank::data::RankedResults::RankedResults ( std::shared_ptr< QueryResults results,
Score scores 
)

Generates a Ranked Results list.

This is actually used to sort QueryResults and to store labels and scores in sorted order. It generates a copy of original data and scores which might be useful for caching. It also provides an un-mapping function.

Parameters
n_instancesThe number of training instances (lines) in the dataset.
n_featuresThe number of features.
quickrank::data::RankedResults::~RankedResults ( )
virtual

Member Function Documentation

const size_t quickrank::data::RankedResults::num_results ( ) const
inline
const size_t quickrank::data::RankedResults::pos_of_rank ( const size_t  rank) const
inline
Label* quickrank::data::RankedResults::sorted_labels ( ) const
inline
Score* quickrank::data::RankedResults::sorted_scores ( ) const
inline

Member Data Documentation

Label* quickrank::data::RankedResults::labels_ = NULL
private
size_t quickrank::data::RankedResults::num_results_
private
Score* quickrank::data::RankedResults::scores_ = NULL
private
size_t* quickrank::data::RankedResults::unmap_ = NULL
private

The documentation for this class was generated from the following files: