xgboost
| 命名空间 |
objective.h 文件参考

xgboost 使用的目标函数的接口。 更多...

#include <dmlc/registry.h>
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/host_device_vector.h>
#include <xgboost/model.h>
#include <xgboost/task.h>
#include <cstdint>
#include <functional>
#include <string>
objective.h 的包含依赖图

转到此文件的源代码。

class  xgboost::ObjFunction
 目标函数的接口 更多...
 
struct  xgboost::ObjFunctionReg
 目标函数工厂函数的注册项。 更多...
 

命名空间

 xgboost
 多目标树的核心数据结构。
 

#define XGBOOST_REGISTER_OBJECTIVE(UniqueId, Name)
 注册目标函数的宏。 更多...
 

详细描述

xgboost 使用的目标函数的接口。

Copyright 2014-2024, XGBoost 贡献者

作者
Tianqi Chen, Kailong Chen

宏定义文档

◆ XGBOOST_REGISTER_OBJECTIVE

#define XGBOOST_REGISTER_OBJECTIVE (   UniqueId,
  Name 
)
static DMLC_ATTRIBUTE_UNUSED ::xgboost::ObjFunctionReg & \
__make_ ## ObjFunctionReg ## _ ## UniqueId ## __ = \
::dmlc::Registry< ::xgboost::ObjFunctionReg>::Get()->__REGISTER__(Name)

注册目标函数的宏。

// 注册目标函数的示例
XGBOOST_REGISTER_OBJECTIVE(LinearRegression, "reg:squarederror")
.describe("线性回归目标")
.set_body([]() {
return new RegLossObj(LossType::kLinearSquare);
});
#define XGBOOST_REGISTER_OBJECTIVE(UniqueId, Name)
注册目标函数的宏。
定义: objective.h:158