Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
xgboost::obj::RegLossObjOneAPI< Loss > Class Template Reference
Inheritance diagram for xgboost::obj::RegLossObjOneAPI< Loss >:
xgboost::ObjFunction xgboost::Configurable

Public Member Functions

void Configure (const std::vector< std::pair< std::string, std::string > > &args) override
 Configure the objective with the specified parameters.
 
void GetGradient (const HostDeviceVector< bst_float > &preds, const MetaInfo &info, int iter, HostDeviceVector< GradientPair > *out_gpair) override
 Get gradient over each of predictions, given existing information.
 
const char * DefaultEvalMetric () const override
 
void PredTransform (HostDeviceVector< float > *io_preds) override
 
float ProbToMargin (float base_score) const override
 transform probability value back to margin this is used to transform user-set base_score back to margin used by gradient boosting
 
void SaveConfig (Json *p_out) const override
 Save configuration to JSON object.
 
void LoadConfig (Json const &in) override
 Load configuration from JSON object.
 
- Public Member Functions inherited from xgboost::ObjFunction
 ~ObjFunction () override=default
 virtual destructor
 
virtual Json DefaultMetricConfig () const
 Return the configuration for the default metric.
 
virtual void PredTransform (HostDeviceVector< bst_float > *) const
 transform prediction values, this is only called when Prediction is called
 
virtual void EvalTransform (HostDeviceVector< bst_float > *io_preds)
 transform prediction values, this is only called when Eval is called, usually it redirect to PredTransform
 
virtual void InitEstimation (MetaInfo const &info, linalg::Tensor< float, 1 > *base_score) const
 Make initialize estimation of prediction.
 
virtual struct ObjInfo Task () const =0
 Return task of this objective.
 
virtual bst_target_t Targets (MetaInfo const &info) const
 Return number of targets for input matrix.
 
virtual void UpdateTreeLeaf (HostDeviceVector< bst_node_t > const &, MetaInfo const &, float, HostDeviceVector< float > const &, std::int32_t, RegTree *) const
 Update the leaf values after a tree is built.
 

Protected Attributes

HostDeviceVector< int > label_correct_
 
RegLossParamOneAPI param_
 
cl::sycl::queue qu_
 
- Protected Attributes inherited from xgboost::ObjFunction
Context const * ctx_
 

Additional Inherited Members

- Static Public Member Functions inherited from xgboost::ObjFunction
static constexpr float DefaultBaseScore ()
 
static ObjFunctionCreate (const std::string &name, Context const *ctx)
 Create an objective function according to name.
 

Member Function Documentation

◆ Configure()

template<typename Loss >
void xgboost::obj::RegLossObjOneAPI< Loss >::Configure ( const std::vector< std::pair< std::string, std::string > > &  args)
inlineoverridevirtual

Configure the objective with the specified parameters.

Parameters
argsarguments to the objective function.

Implements xgboost::ObjFunction.

◆ DefaultEvalMetric()

template<typename Loss >
const char * xgboost::obj::RegLossObjOneAPI< Loss >::DefaultEvalMetric ( ) const
inlineoverridevirtual
Returns
the default evaluation metric for the objective

Implements xgboost::ObjFunction.

◆ GetGradient()

template<typename Loss >
void xgboost::obj::RegLossObjOneAPI< Loss >::GetGradient ( const HostDeviceVector< bst_float > &  preds,
const MetaInfo info,
int  iteration,
HostDeviceVector< GradientPair > *  out_gpair 
)
inlineoverridevirtual

Get gradient over each of predictions, given existing information.

Parameters
predsprediction of current round
infoinformation about labels, weights, groups in rank
iterationcurrent iteration number.
out_gpairoutput of get gradient, saves gradient and second order gradient in

Implements xgboost::ObjFunction.

◆ LoadConfig()

template<typename Loss >
void xgboost::obj::RegLossObjOneAPI< Loss >::LoadConfig ( Json const &  in)
inlineoverridevirtual

Load configuration from JSON object.

Parameters
inJSON object containing the configuration

Implements xgboost::Configurable.

◆ ProbToMargin()

template<typename Loss >
float xgboost::obj::RegLossObjOneAPI< Loss >::ProbToMargin ( float  base_score) const
inlineoverridevirtual

transform probability value back to margin this is used to transform user-set base_score back to margin used by gradient boosting

Returns
transformed value

Reimplemented from xgboost::ObjFunction.

◆ SaveConfig()

template<typename Loss >
void xgboost::obj::RegLossObjOneAPI< Loss >::SaveConfig ( Json out) const
inlineoverridevirtual

Save configuration to JSON object.

Parameters
outpointer to output JSON object

Implements xgboost::Configurable.


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