QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
This class implements a Tie-aware version of Normalized Discounted Cumulative Gain TNDCG@k measure. More...
#include <tndcg.h>
Public Member Functions | |
Tndcg (size_t k=NO_CUTOFF) | |
virtual | ~Tndcg () |
virtual std::string | name () const |
Returns the name of the metric. More... | |
virtual MetricScore | evaluate_result_list (const quickrank::data::QueryResults *rl, const Score *scores) const |
virtual std::unique_ptr< Jacobian > | jacobian (std::shared_ptr< data::RankedResults > ranked) const |
Computes the Jacobian matrix. More... | |
Public Member Functions inherited from quickrank::metric::ir::Ndcg | |
Ndcg (size_t k=NO_CUTOFF) | |
virtual | ~Ndcg () |
Public Member Functions inherited from quickrank::metric::ir::Dcg | |
Dcg (size_t k=NO_CUTOFF) | |
virtual | ~Dcg () |
Public Member Functions inherited from quickrank::metric::ir::Metric | |
Metric (size_t k=NO_CUTOFF) | |
Creates a new metric with the specified cut-off threshold. More... | |
virtual | ~Metric () |
size_t | cutoff () const |
Returns the current cut-off of the Metric. More... | |
void | set_cutoff (size_t k) |
Updates the cut-off of the Metric. More... | |
virtual MetricScore | evaluate_dataset (const std::shared_ptr< data::Dataset > dataset, const Score *scores) const |
virtual MetricScore | evaluate_dataset (const std::shared_ptr< data::VerticalDataset > dataset, const Score *scores) const |
Static Public Attributes | |
static const std::string | NAME_ = "TNDCG" |
Static Public Attributes inherited from quickrank::metric::ir::Ndcg | |
static const std::string | NAME_ = "NDCG" |
Static Public Attributes inherited from quickrank::metric::ir::Dcg | |
static const std::string | NAME_ = "DCG" |
Static Public Attributes inherited from quickrank::metric::ir::Metric | |
static const size_t | NO_CUTOFF = SIZE_MAX |
This should be used when no cut-off on the results list is required. More... | |
Protected Member Functions | |
MetricScore | compute_tndcg (const quickrank::data::QueryResults *rl, const Score *scores) const |
Computes the TNDCG@K of a given list of labels. More... | |
Protected Member Functions inherited from quickrank::metric::ir::Ndcg | |
MetricScore | compute_idcg (const quickrank::data::QueryResults *rl) const |
Computes the IDCG@K of a given list of labels. More... | |
Protected Member Functions inherited from quickrank::metric::ir::Dcg | |
MetricScore | compute_dcg (const Label *labels, size_t len) const |
Computes the DCG@K of a given array of labels. More... | |
Private Member Functions | |
virtual std::ostream & | put (std::ostream &os) const |
Prints the short name of the Metric, e.g., "NDCG@K". More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Tndcg &tndcg) |
This class implements a Tie-aware version of Normalized Discounted Cumulative Gain TNDCG@k measure.
see: McSherry, Frank, and Marc Najork. "Computing information retrieval performance measures efficiently in the presence of tied scores." In Advances in information retrieval, pp. 414-421. Springer Berlin Heidelberg, 2008.
|
inlineexplicit |
|
inlinevirtual |
|
protected |
Computes the TNDCG@K of a given list of labels.
rl | The given results list. Only labels are actually used. |
scores | The scores to be used to re-order the result list. |
|
virtual |
Make this choice available.
rl | A results list. |
scores | a list of scores |
Reimplemented from quickrank::metric::ir::Ndcg.
|
virtual |
Computes the Jacobian matrix.
This is a symmetric matrix storing the metric "decrease" when two documents scores are swapped.
rl | A results list. |
Reimplemented from quickrank::metric::ir::Ndcg.
|
inlinevirtual |
Returns the name of the metric.
Reimplemented from quickrank::metric::ir::Ndcg.
|
privatevirtual |
Prints the short name of the Metric, e.g., "NDCG@K".
Reimplemented from quickrank::metric::ir::Ndcg.
|
friend |
|
static |