46 virtual std::string
name()
const {
55 virtual std::unique_ptr<Jacobian>
jacobian(
56 std::shared_ptr<data::RankedResults> ranked)
const;
68 virtual std::ostream &
put(std::ostream &os)
const;
Definition: dataset.cc:28
This class implements the basic functionalities of an IR evaluation metric.
Definition: metric.h:43
MetricScore compute_dcg(const Label *labels, size_t len) const
Computes the DCG@K of a given array of labels.
Definition: dcg.cc:33
friend std::ostream & operator<<(std::ostream &os, const Dcg &ndcg)
Definition: dcg.h:65
double Score
data type for instance truth label
Definition: types.h:30
Dcg(size_t k=NO_CUTOFF)
Definition: dcg.h:39
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.
Definition: dcg.cc:41
static const size_t NO_CUTOFF
This should be used when no cut-off on the results list is required.
Definition: metric.h:46
virtual ~Dcg()
Definition: dcg.h:42
virtual std::unique_ptr< Jacobian > jacobian(std::shared_ptr< data::RankedResults > ranked) const
Computes the Jacobian matrix.
Definition: dcg.cc:59
static const std::string NAME_
Definition: dcg.h:50
This class implements the Discounted cumulative Gain DCG@K measure.
Definition: dcg.h:37
This class wraps a set of results for a given query.
Definition: queryresults.h:36
virtual std::ostream & put(std::ostream &os) const
Prints the short name of the Metric, e.g., "NDCG@K".
Definition: dcg.cc:86
float Label
Definition: types.h:29
double MetricScore
data type for QueryID in L-t-R datasets
Definition: types.h:33
virtual std::string name() const
Returns the name of the metric.
Definition: dcg.h:46