The SSE (Sum of Squared Errors) loss is a loss function to measure the quality of prediction of response values present in the node of each xgboost tree. More...
Public Member Functions | |
SSELoss () | |
SSELoss (const double alpha, const double lambda) | |
double | Evaluate (const size_t begin, const size_t end) |
Calculates the gain from begin to end. More... | |
template<bool UseWeights, typename MatType , typename WeightVecType > | |
double | Evaluate (const MatType &input, const WeightVecType &) |
Calculates the gain of the node before splitting. More... | |
template < typename VecType > | |
VecType::elem_type | InitialPrediction (const VecType &values) |
Returns the initial predition for gradient boosting. More... | |
template < typename MatType , typename WeightVecType > | |
double | OutputLeafValue (const MatType &, const WeightVecType &) |
Returns the output value for the leaf in the tree. More... | |
The SSE (Sum of Squared Errors) loss is a loss function to measure the quality of prediction of response values present in the node of each xgboost tree.
It is also a good measure to compare the spread of two distributions. We will try to minimize this value while training.
Loss = 1 / 2 * (Observed - Predicted)^2
Definition at line 29 of file sse_loss.hpp.
|
inline |
Definition at line 33 of file sse_loss.hpp.
|
inline |
Definition at line 35 of file sse_loss.hpp.
|
inline |
Calculates the gain from begin to end.
begin | The begin index to calculate gain. |
end | The end index to calculate gain. |
Definition at line 70 of file sse_loss.hpp.
|
inline |
Calculates the gain of the node before splitting.
It also initializes the gradients and hessians used later for finding split. UseWeights and weights are ignored here. These are just to make the API consistent.
input | This is a 2D matrix. The first row stores the true observed values and the second row stores the prediction at the current step of boosting. |
Definition at line 87 of file sse_loss.hpp.
|
inline |
Returns the initial predition for gradient boosting.
Definition at line 45 of file sse_loss.hpp.
|
inline |
Returns the output value for the leaf in the tree.
Definition at line 58 of file sse_loss.hpp.