xgboost
Public Types | Public Member Functions | Public Attributes | List of all members
xgboost::ObjInfo Struct Reference

A struct returned by objective, which determines task at hand. The struct is not used by any algorithm yet, only for future development like categorical split. More...

#include <task.h>

Collaboration diagram for xgboost::ObjInfo:
Collaboration graph

Public Types

enum  Task : uint8_t {
  kRegression = 0 , kBinary = 1 , kClassification = 2 , kSurvival = 3 ,
  kRanking = 4 , kOther = 5
}
 

Public Member Functions

 ObjInfo (Task t)
 
 ObjInfo (Task t, bool khess, bool zhess)
 
XGBOOST_DEVICE bool UpdateTreeLeaf () const
 Use adaptive tree if the objective doesn't have valid hessian value. More...
 

Public Attributes

enum xgboost::ObjInfo::Task task
 
bool const_hess {false}
 
bool zero_hess {false}
 

Detailed Description

A struct returned by objective, which determines task at hand. The struct is not used by any algorithm yet, only for future development like categorical split.

The task field is useful for tree split finding, also for some metrics like auc. Lastly, knowing whether hessian is constant can allow some optimizations like skipping the quantile sketching.

This struct should not be serialized since it can be recovered from objective function, hence it doesn't need to be stable.

Member Enumeration Documentation

◆ Task

enum xgboost::ObjInfo::Task : uint8_t
Enumerator
kRegression 
kBinary 
kClassification 
kSurvival 
kRanking 
kOther 

Constructor & Destructor Documentation

◆ ObjInfo() [1/2]

xgboost::ObjInfo::ObjInfo ( Task  t)
inline

◆ ObjInfo() [2/2]

xgboost::ObjInfo::ObjInfo ( Task  t,
bool  khess,
bool  zhess 
)
inline

Member Function Documentation

◆ UpdateTreeLeaf()

XGBOOST_DEVICE bool xgboost::ObjInfo::UpdateTreeLeaf ( ) const
inline

Use adaptive tree if the objective doesn't have valid hessian value.

Member Data Documentation

◆ const_hess

bool xgboost::ObjInfo::const_hess {false}

◆ task

enum xgboost::ObjInfo::Task xgboost::ObjInfo::task

◆ zero_hess

bool xgboost::ObjInfo::zero_hess {false}

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