Fix static analysis error

This commit is contained in:
Rishabh Garg
2021-07-16 09:17:57 +05:30
parent 1a7c16feb6
commit 76d685cd2e
2 changed files with 2 additions and 2 deletions
@@ -55,7 +55,7 @@ class SSELoss
* Returns the output value for the leaf in the tree.
*/
template<typename MatType, typename WeightVecType>
double OutputLeafValue(const MatType& input,
double OutputLeafValue(const MatType& /* input */,
const WeightVecType& /* weights */)
{
return -ApplyL1(arma::accu(gradients)) / (arma::accu(hessians) + lambda);
+1 -1
View File
@@ -44,7 +44,7 @@ TEST_CASE("SSELeafValueTest", "[XGBTest]")
double leafValue = -0.075;
SSELoss Loss;
double gain = Loss.Evaluate<false>(input, weights);
double = Loss.Evaluate<false>(input, weights);
REQUIRE(Loss.OutputLeafValue(input, weights) == leafValue);
}