xgboost
Classes | Namespaces | Macros
metric.h File Reference

interface of evaluation metric function supported in xgboost. More...

#include <dmlc/registry.h>
#include <xgboost/model.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/data.h>
#include <xgboost/base.h>
#include <xgboost/host_device_vector.h>
#include <vector>
#include <string>
#include <functional>
#include <utility>
Include dependency graph for metric.h:

Go to the source code of this file.

Classes

class  xgboost::Metric
 interface of evaluation metric used to evaluate model performance. This has nothing to do with training, but merely act as evaluation purpose. More...
 
struct  xgboost::MetricReg
 Registry entry for Metric factory functions. The additional parameter const char* param gives the value after @, can be null. For example, metric map@3, then: param == "3". More...
 

Namespaces

 xgboost
 namespace of xgboost
 

Macros

#define XGBOOST_REGISTER_METRIC(UniqueId, Name)
 Macro to register metric. More...
 

Detailed Description

interface of evaluation metric function supported in xgboost.

Copyright 2014 by Contributors

Author
Tianqi Chen, Kailong Chen

Macro Definition Documentation

◆ XGBOOST_REGISTER_METRIC

#define XGBOOST_REGISTER_METRIC (   UniqueId,
  Name 
)
Value:
::xgboost::MetricReg& __make_ ## MetricReg ## _ ## UniqueId ## __ = \
::dmlc::Registry< ::xgboost::MetricReg>::Get()->__REGISTER__(Name)
Registry entry for Metric factory functions. The additional parameter const char* param gives the val...
Definition: metric.h:84

Macro to register metric.

// example of registering a objective ndcg@k
.describe("Rooted mean square error.")
.set_body([](const char* param) {
int at_k = atoi(param);
return new NDCG(at_k);
});