Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
xgboost::LearnerModelParamLegacy Struct Reference

training parameter for regression More...

Inheritance diagram for xgboost::LearnerModelParamLegacy:

Public Member Functions

 LearnerModelParamLegacy ()
 constructor
 
Json ToJson () const
 
void FromJson (Json const &obj)
 
LearnerModelParamLegacy ByteSwap () const
 
template<typename Container >
Args UpdateAllowUnknown (Container const &kwargs)
 
void Validate ()
 
 DMLC_DECLARE_PARAMETER (LearnerModelParamLegacy)
 

Data Fields

bst_float base_score
 
bst_feature_t num_feature
 
std::int32_t num_class
 
int32_t contain_extra_attrs
 Model contain additional properties.
 
int32_t contain_eval_metrics
 Model contain eval metrics.
 
std::uint32_t major_version
 the version of XGBoost.
 
std::uint32_t minor_version
 
bst_target_t num_target
 Number of target variables.
 
std::int32_t boost_from_average {true}
 Whether we should calculate the base score from training data.
 
int reserved [25]
 reserved field
 

Detailed Description

training parameter for regression

Should be deprecated, but still used for being compatible with binary IO. Once it's gone, LearnerModelParam should handle transforming base_margin with objective by itself.

Field Documentation

◆ boost_from_average

std::int32_t xgboost::LearnerModelParamLegacy::boost_from_average {true}

Whether we should calculate the base score from training data.

This is a private parameter as we can't expose it as boolean due to binary model format. Exposing it as integer creates inconsistency with other parameters.

Automatically disabled when base_score is specifed by user. int32 is used instead of bool for the ease of serialization.


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