Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost::obj::MyLogistic Class Reference
Inheritance diagram for xgboost::obj::MyLogistic:
xgboost::ObjFunction xgboost::Configurable

Public Member Functions

void Configure (const Args &args) override
 Configure the objective with the specified parameters.
 
ObjInfo Task () const override
 Return task of this objective.
 
void GetGradient (const HostDeviceVector< bst_float > &preds, const MetaInfo &info, int32_t, HostDeviceVector< GradientPair > *out_gpair) override
 
const char * DefaultEvalMetric () const override
 
void PredTransform (HostDeviceVector< bst_float > *io_preds) const override
 transform prediction values, this is only called when Prediction is called
 
bst_float ProbToMargin (bst_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 void GetGradient (const HostDeviceVector< bst_float > &preds, const MetaInfo &info, int iteration, HostDeviceVector< GradientPair > *out_gpair)=0
 Get gradient over each of predictions, given existing information.
 
virtual Json DefaultMetricConfig () const
 Return the configuration for the default metric.
 
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 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.
 

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.
 
- Protected Attributes inherited from xgboost::ObjFunction
Context const * ctx_
 

Member Function Documentation

◆ Configure()

void xgboost::obj::MyLogistic::Configure ( const Args &  args)
inlineoverridevirtual

Configure the objective with the specified parameters.

Parameters
argsarguments to the objective function.

Implements xgboost::ObjFunction.

◆ DefaultEvalMetric()

const char * xgboost::obj::MyLogistic::DefaultEvalMetric ( ) const
inlineoverridevirtual
Returns
the default evaluation metric for the objective

Implements xgboost::ObjFunction.

◆ LoadConfig()

void xgboost::obj::MyLogistic::LoadConfig ( Json const &  in)
inlineoverridevirtual

Load configuration from JSON object.

Parameters
inJSON object containing the configuration

Implements xgboost::Configurable.

◆ PredTransform()

void xgboost::obj::MyLogistic::PredTransform ( HostDeviceVector< bst_float > *  ) const
inlineoverridevirtual

transform prediction values, this is only called when Prediction is called

Parameters
io_predsprediction values, saves to this vector as well

Reimplemented from xgboost::ObjFunction.

◆ ProbToMargin()

bst_float xgboost::obj::MyLogistic::ProbToMargin ( bst_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()

void xgboost::obj::MyLogistic::SaveConfig ( Json out) const
inlineoverridevirtual

Save configuration to JSON object.

Parameters
outpointer to output JSON object

Implements xgboost::Configurable.

◆ Task()

ObjInfo xgboost::obj::MyLogistic::Task ( ) const
inlineoverridevirtual

Return task of this objective.

Implements xgboost::ObjFunction.


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