QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
This class implements the average precision AP@k measure. More...
#include <map.h>
Public Member Functions | |
Map (size_t k=NO_CUTOFF) | |
virtual | ~Map () |
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 |
Measures the quality of the given results list according to the Metric. More... | |
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::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_ = "MAP" |
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... | |
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 Map &map) |
This class implements the average precision AP@k measure.
|
inlineexplicit |
|
inlinevirtual |
|
virtual |
Measures the quality of the given results list according to the Metric.
rl | A results list. |
scores | a list of scores |
Implements quickrank::metric::ir::Metric.
|
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::Metric.
|
inlinevirtual |
Returns the name of the metric.
Implements quickrank::metric::ir::Metric.
|
privatevirtual |
Prints the short name of the Metric, e.g., "NDCG@K".
Implements quickrank::metric::ir::Metric.
|
friend |
|
static |