Skip to content

Commit

Permalink
Fixes and changes to the ranking metrics computed on cpu (#5380)
Browse files Browse the repository at this point in the history
* - fixes and changes to the ranking metrics computed on cpu
  - auc/aucpr ranking metric accelerated on cpu
  - fixes to the auc/aucpr metrics
  • Loading branch information
sriramch committed Mar 3, 2020
1 parent 71a8b8c commit 5dc8e89
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 192 deletions.
15 changes: 15 additions & 0 deletions src/metric/metric_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@
#ifndef XGBOOST_METRIC_METRIC_COMMON_H_
#define XGBOOST_METRIC_METRIC_COMMON_H_

#include <utility>
#include <vector>
#include <limits>
#include <string>

#include "../common/common.h"

namespace xgboost {
namespace metric {

// Ranking config to be used on device and host
struct EvalRankConfig {
public:
// Parsed from metric name, the top-n number of instances within a group after
// ranking to use for evaluation.
unsigned topn{std::numeric_limits<unsigned>::max()};
std::string name;
bool minus{false};
};

class PackedReduceResult {
double residue_sum_;
double weights_sum_;
Expand Down

0 comments on commit 5dc8e89

Please sign in to comment.