Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost::metric::EvalNDCG Class Reference

Implement the NDCG score function for learning to rank. More...

Inheritance diagram for xgboost::metric::EvalNDCG:
xgboost::metric::EvalRankWithCache< ltr::NDCGCache > xgboost::Metric xgboost::Configurable

Public Member Functions

double Eval (HostDeviceVector< float > const &preds, MetaInfo const &info, std::shared_ptr< ltr::NDCGCache > p_cache) override
 
 EvalRankWithCache (StringView name, const char *param)
 
- Public Member Functions inherited from xgboost::metric::EvalRankWithCache< ltr::NDCGCache >
 EvalRankWithCache (StringView name, const char *param)
 
void Configure (Args const &) override
 Configure the Metric with the specified parameters.
 
void LoadConfig (Json const &in) override
 Load configuration from JSON object.
 
void SaveConfig (Json *p_out) const override
 Save configuration to JSON object.
 
double Evaluate (HostDeviceVector< float > const &preds, std::shared_ptr< DMatrix > p_fmat) override
 Evaluate a metric with DMatrix as input.
 
const char * Name () const override
 
- Public Member Functions inherited from xgboost::Metric
void LoadConfig (Json const &) override
 Load configuration from JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
 
void SaveConfig (Json *p_out) const override
 Save configuration to JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
 
 ~Metric () override=default
 virtual destructor
 

Additional Inherited Members

- Static Public Member Functions inherited from xgboost::Metric
static MetricCreate (const std::string &name, Context const *ctx)
 create a metric according to name.
 
- Protected Attributes inherited from xgboost::metric::EvalRankWithCache< ltr::NDCGCache >
ltr::LambdaRankParam param_
 
bool minus_
 
std::string name_
 
DMatrixCache< ltr::NDCGCachecache_
 
- Protected Attributes inherited from xgboost::Metric
Context const * ctx_ {nullptr}
 

Detailed Description

Implement the NDCG score function for learning to rank.

Ties are ignored, which can lead to different result with other implementations.

Member Function Documentation

◆ Eval()

double xgboost::metric::EvalNDCG::Eval ( HostDeviceVector< float > const &  preds,
MetaInfo const &  info,
std::shared_ptr< ltr::NDCGCache p_cache 
)
inlineoverridevirtual

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