xgboost
task.h
Go to the documentation of this file.
1 
4 #ifndef XGBOOST_TASK_H_
5 #define XGBOOST_TASK_H_
6 
7 #include <xgboost/base.h>
8 
9 #include <cinttypes>
10 
11 namespace xgboost {
24 struct ObjInfo {
25  // What kind of problem are we trying to solve
26  enum Task : uint8_t {
28  kBinary = 1,
30  kSurvival = 3,
31  kRanking = 4,
32  kOther = 5,
33  } task;
34  // Does the objective have constant hessian value?
35  bool const_hess{false};
36 
37  explicit ObjInfo(Task t) : task{t} {}
38  ObjInfo(Task t, bool khess) : task{t}, const_hess{khess} {}
39 };
40 } // namespace xgboost
41 #endif // XGBOOST_TASK_H_
xgboost::ObjInfo::kClassification
@ kClassification
Definition: task.h:29
xgboost::ObjInfo::kRegression
@ kRegression
Definition: task.h:27
xgboost::ObjInfo::kBinary
@ kBinary
Definition: task.h:28
xgboost::ObjInfo::ObjInfo
ObjInfo(Task t)
Definition: task.h:37
xgboost::ObjInfo::kRanking
@ kRanking
Definition: task.h:31
xgboost::ObjInfo::Task
Task
Definition: task.h:26
xgboost::ObjInfo::ObjInfo
ObjInfo(Task t, bool khess)
Definition: task.h:38
base.h
defines configuration macros of xgboost.
xgboost::ObjInfo::task
enum xgboost::ObjInfo::Task task
xgboost::ObjInfo::const_hess
bool const_hess
Definition: task.h:35
xgboost::ObjInfo::kSurvival
@ kSurvival
Definition: task.h:30
xgboost::ObjInfo::kOther
@ kOther
Definition: task.h:32
xgboost::ObjInfo
A struct returned by objective, which determines task at hand. The struct is not used by any algorith...
Definition: task.h:24
xgboost
namespace of xgboost
Definition: base.h:110