File scalar_math_decomposable.hpp¶
-
namespace boosting
Functions
-
template<typename StatisticType>
static inline float32 getL1RegularizationWeight(StatisticType gradient, float32 l1RegularizationWeight)¶ Returns the L1 regularization weight to be added to a specific gradient.
- Template Parameters:
StatisticType – The type of the gradient
- Parameters:
gradient – The gradient, the L1 regularization weight should be added to
l1RegularizationWeight – The L1 regularization weight
- Returns:
The L1 regularization weight to be added to the gradient
-
template<typename StatisticType>
static inline StatisticType calculateOutputWiseScore(StatisticType gradient, StatisticType hessian, float32 l1RegularizationWeight, float32 l2RegularizationWeight)¶ Calculates and returns the optimal score to be predicted for a single output, based on the corresponding gradient and Hessian and taking L1 and L2 regularization into account.
- Template Parameters:
StatisticType – The type of the gradient and Hessian
- Parameters:
gradient – The gradient that corresponds to the output
hessian – The Hessian that corresponds to the output
l1RegularizationWeight – The weight of the L1 regularization
l2RegularizationWeight – The weight of the L2 regularization
- Returns:
The predicted score that has been calculated
-
template<typename StatisticType>
static inline StatisticType calculateOutputWiseQuality(StatisticType score, StatisticType gradient, StatisticType hessian, float32 l1RegularizationWeight, float32 l2RegularizationWeight)¶ Calculates and returns the quality of the prediction for a single output, taking L1 and L2 regularization into account.
- Template Parameters:
StatisticType – The type of the predicted score, gradient and Hessian
- Parameters:
score – The predicted score
gradient – The gradient
hessian – The Hessian
l1RegularizationWeight – The weight of the L1 regularization
l2RegularizationWeight – The weight of the L2 regularization
- Returns:
The quality that has been calculated
-
template<typename StatisticType>